pyo3::buffer

Trait Element

Source
pub unsafe trait Element: Copy {
    // Required method
    fn is_compatible_format(format: &CStr) -> bool;
}
Expand description

Trait implemented for possible element types of PyBuffer.

§Safety

This trait must only be implemented for types which represent valid elements of Python buffers.

Required Methods§

Source

fn is_compatible_format(format: &CStr) -> bool

Gets whether the element specified in the format string is potentially compatible. Alignment and size are checked separately from this function.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Element for f32

Source§

impl Element for f64

Source§

impl Element for i8

Source§

impl Element for i16

Source§

impl Element for i32

Source§

impl Element for i64

Source§

impl Element for isize

Source§

impl Element for u8

Source§

impl Element for u16

Source§

impl Element for u32

Source§

impl Element for u64

Source§

impl Element for usize

Implementors§