pub trait Pushable<T>: Sized + Default {
type Freeze;
// Required methods
fn reserve(&mut self, additional: usize);
fn push(&mut self, value: T);
fn len(&self) -> usize;
fn push_null(&mut self);
fn extend_constant(&mut self, additional: usize, value: T);
fn extend_null_constant(&mut self, additional: usize);
fn freeze(self) -> Self::Freeze;
// Provided methods
fn with_capacity(capacity: usize) -> Self { ... }
fn extend_n(&mut self, n: usize, iter: impl Iterator<Item = T>) { ... }
}
Expand description
A private trait representing structs that can receive elements.
Required Associated Types§
Required Methods§
fn reserve(&mut self, additional: usize)
fn push(&mut self, value: T)
fn len(&self) -> usize
fn push_null(&mut self)
fn extend_constant(&mut self, additional: usize, value: T)
fn extend_null_constant(&mut self, additional: usize)
fn freeze(self) -> Self::Freeze
Provided Methods§
fn with_capacity(capacity: usize) -> Self
fn extend_n(&mut self, n: usize, iter: impl Iterator<Item = T>)
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.