pub trait ArrayInstance: Deref<Target = Array<Self::DType>> + DerefMut {
type DType: HasAfEnum;
// Provided methods
fn af_cast<T: HasAfEnum>(&self) -> Array<T> { ... }
fn len(&self) -> usize { ... }
fn get(&self, index: Indexer<'_>) -> Array<Self::DType> { ... }
fn set<T: ArrayInstance<DType = Self::DType>>(
&mut self,
index: &Indexer<'_>,
other: &T,
) { ... }
fn set_at(&mut self, offset: usize, value: Self::DType) { ... }
fn to_vec(&self) -> Vec<Self::DType>
where Self::DType: Clone + Default { ... }
}Expand description
Defines common access methods for instance of ArrayExt.
Required Associated Types§
Provided Methods§
Sourcefn get(&self, index: Indexer<'_>) -> Array<Self::DType>
fn get(&self, index: Indexer<'_>) -> Array<Self::DType>
Get the values specified by the given af::Indexer.
Sourcefn set<T: ArrayInstance<DType = Self::DType>>(
&mut self,
index: &Indexer<'_>,
other: &T,
)
fn set<T: ArrayInstance<DType = Self::DType>>( &mut self, index: &Indexer<'_>, other: &T, )
Set the values specified by the given af::Indexer to the corresponding values in T.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".