pub trait ArrayOps<T: 'static, I> {
// Required methods
fn data(&self) -> &[T];
fn offset(&self, index: I) -> usize;
// Provided methods
fn first(&self) -> &T { ... }
fn as_slice(&self) -> &[T] { ... }
fn subarray(&self, index: I) -> &[T] { ... }
fn iter(&self) -> impl Iterator<Item = &T> { ... }
fn subscript(&self, index: I) -> i32 { ... }
}Required Methods§
Provided Methods§
fn first(&self) -> &T
fn as_slice(&self) -> &[T]
fn subarray(&self, index: I) -> &[T]
fn iter(&self) -> impl Iterator<Item = &T>
fn subscript(&self, index: I) -> i32
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.