pub trait ImmutableArray<T>: Default + Index<Length> {
// Required methods
fn length(&self) -> Length;
fn capacity(&self) -> Length;
fn as_slice(&self) -> &[T];
// Provided method
fn is_empty(&self) -> bool { ... }
}
Expand description
Represents a simply contiguous block of memory.
Required Methods§
Provided Methods§
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.