Trait pyo3::buffer::Element

source ·
pub unsafe trait Element: Copy {
    fn is_compatible_format(format: &CStr) -> bool;
}
Available on non-Py_LIMITED_API or Py_3_11 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§

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

Implementations on Foreign Types§

Implementors§