pub trait ArrayElement: Sized + Sealed {
const DTYPE: Dtype;
// Required methods
fn array_item(array: &Array) -> Result<Self>;
fn array_data(array: &Array) -> *const Self;
}
Expand description
A marker trait for array elements.
Required Associated Constants§
Required Methods§
Sourcefn array_item(array: &Array) -> Result<Self>
fn array_item(array: &Array) -> Result<Self>
Access the value of a scalar array. Returns Err
if the array is not scalar.
Sourcefn array_data(array: &Array) -> *const Self
fn array_data(array: &Array) -> *const Self
Access the raw data of an array.
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.