pub trait Extend {
type Item;
// Required method
fn extend<Items>(&mut self, items: Items)
where Items: IntoIterator<Item = Self::Item>;
}Expand description
Abstracts something which can extend an &mut self.
Required Associated Types§
Required Methods§
Sourcefn extend<Items>(&mut self, items: Items)where
Items: IntoIterator<Item = Self::Item>,
fn extend<Items>(&mut self, items: Items)where
Items: IntoIterator<Item = Self::Item>,
Used to extend a collection with an IntoIterator object.
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.
Implementations on Foreign Types§
Source§impl<Item> Extend for LinkedList<Item>
Available on crate feature alloc only.
impl<Item> Extend for LinkedList<Item>
Available on crate feature
alloc only.Source§impl<Item, const N: usize> Extend for SmallVec<[Item; N]>
Available on crate feature smallvec only.
impl<Item, const N: usize> Extend for SmallVec<[Item; N]>
Available on crate feature
smallvec only.Source§impl<Item: Eq + Hash, Seed: BuildHasher> Extend for HashSet<Item, Seed>
Available on crate feature hashmap only.
impl<Item: Eq + Hash, Seed: BuildHasher> Extend for HashSet<Item, Seed>
Available on crate feature
hashmap only.Source§impl<Item: Ord> Extend for BinaryHeap<Item>
Available on crate feature alloc only.
impl<Item: Ord> Extend for BinaryHeap<Item>
Available on crate feature
alloc only.Source§impl<Key: Eq + Hash, Value, Seed: BuildHasher> Extend for HashMap<Key, Value, Seed>
Available on crate feature hashmap only.
impl<Key: Eq + Hash, Value, Seed: BuildHasher> Extend for HashMap<Key, Value, Seed>
Available on crate feature
hashmap only.type Item = (Key, Value)
fn extend<Items>(&mut self, items: Items)where
Items: IntoIterator<Item = Self::Item>,
Source§impl<Key: Ord, Value> Extend for BTreeMap<Key, Value>
Available on crate feature alloc only.
impl<Key: Ord, Value> Extend for BTreeMap<Key, Value>
Available on crate feature
alloc only.