devela::_dep::pyo3::buffer

Trait Element

pub unsafe trait Element: Copy {
    // Required method
    fn is_compatible_format(format: &CStr) -> bool;
}
Available on crate features dep_pyo3 and std only.
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§

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§

§

impl Element for f32

§

impl Element for f64

§

impl Element for i8

§

impl Element for i16

§

impl Element for i32

§

impl Element for i64

§

impl Element for isize

§

impl Element for u8

§

impl Element for u16

§

impl Element for u32

§

impl Element for u64

§

impl Element for usize

Implementors§