pub trait Storage<T>{
type Error: 'static;
const EMPTY: Self;
// Required methods
fn with_capacity(capacity: usize) -> Result<Self, Self::Error>;
fn capacity(&self) -> usize;
fn push(&mut self, item: T) -> Result<(), Self::Error>;
}
Expand description
Storage being used in a tree.
Required Associated Constants§
Required Associated Types§
Required Methods§
Sourcefn with_capacity(capacity: usize) -> Result<Self, Self::Error>
fn with_capacity(capacity: usize) -> Result<Self, Self::Error>
Constructstorage with the given capacity.
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.