pub trait Push<T> {
// Required method
fn push(&mut self, item: T);
// Provided method
fn extend(&mut self, iter: impl IntoIterator<Item = T>) { ... }
}Expand description
A type that can accept items of type T.
Required Methods§
Provided Methods§
Sourcefn extend(&mut self, iter: impl IntoIterator<Item = T>)
fn extend(&mut self, iter: impl IntoIterator<Item = T>)
Pushes elements of an iterator onto 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.