pub trait Collection: Index<Range<usize>> {
// Required methods
fn new() -> Self;
fn with_capacity(cap: usize) -> Self;
fn len(&self) -> usize;
fn truncate(&mut self, len: usize);
fn extend_from_slice(&mut self, s: &<Self as Index<Range<usize>>>::Output);
fn split_off(&mut self, at: usize) -> Self;
}
Expand description
A Collection
trait to expose basic required fn for Nested
to work properly
Required Methods§
fn new() -> Self
fn with_capacity(cap: usize) -> Self
fn len(&self) -> usize
fn truncate(&mut self, len: usize)
fn extend_from_slice(&mut self, s: &<Self as Index<Range<usize>>>::Output)
fn split_off(&mut self, at: usize) -> Self
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.