Trait amplify::confinement::Collection
source · pub trait Collection: Extend<Self::Item> {
type Item;
// Required methods
fn with_capacity(capacity: usize) -> Self;
fn len(&self) -> usize;
fn push(&mut self, elem: Self::Item);
fn clear(&mut self);
// Provided method
fn is_empty(&self) -> bool { ... }
}
Expand description
Trait implemented by a collection types which need to support collection confinement.
Required Associated Types§
Required Methods§
sourcefn with_capacity(capacity: usize) -> Self
fn with_capacity(capacity: usize) -> Self
Creates new collection with certain capacity.
Provided Methods§
Object Safety§
This trait is not object safe.