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§
Sourcefn is_compatible_format(format: &CStr) -> bool
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.