Trait Extend

Source
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§

Source

type Item

item of the collection

Required Methods§

Source

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 Extend for ()

Source§

type Item = ()

Source§

fn extend<Items>(&mut self, _items: Items)
where Items: IntoIterator<Item = Self::Item>,

Source§

impl Extend for String

Source§

type Item = char

Source§

fn extend<Items>(&mut self, items: Items)
where Items: IntoIterator<Item = Self::Item>,

Source§

impl<Item> Extend for LinkedList<Item>

Source§

type Item = Item

Source§

fn extend<Items>(&mut self, items: Items)
where Items: IntoIterator<Item = Self::Item>,

Source§

impl<Item> Extend for VecDeque<Item>

Source§

type Item = Item

Source§

fn extend<Items>(&mut self, items: Items)
where Items: IntoIterator<Item = Self::Item>,

Source§

impl<Item> Extend for Vec<Item>

Source§

type Item = Item

Source§

fn extend<Items>(&mut self, items: Items)
where Items: IntoIterator<Item = Item>,

Source§

impl<Item, const N: usize> Extend for SmallVec<[Item; N]>

Source§

type Item = Item

Source§

fn extend<Items>(&mut self, items: Items)
where Items: IntoIterator<Item = Self::Item>,

Source§

impl<Item: Eq + Hash, Seed: BuildHasher> Extend for HashSet<Item, Seed>

Source§

type Item = Item

Source§

fn extend<Items>(&mut self, items: Items)
where Items: IntoIterator<Item = Self::Item>,

Source§

impl<Item: Ord> Extend for BinaryHeap<Item>

Source§

type Item = Item

Source§

fn extend<Items>(&mut self, items: Items)
where Items: IntoIterator<Item = Self::Item>,

Source§

impl<Item: Ord> Extend for BTreeSet<Item>

Source§

type Item = Item

Source§

fn extend<Items>(&mut self, items: Items)
where Items: IntoIterator<Item = Self::Item>,

Source§

impl<Key: Eq + Hash, Value, Seed: BuildHasher> Extend for HashMap<Key, Value, Seed>

Source§

type Item = (Key, Value)

Source§

fn extend<Items>(&mut self, items: Items)
where Items: IntoIterator<Item = Self::Item>,

Source§

impl<Key: Ord, Value> Extend for BTreeMap<Key, Value>

Source§

type Item = (Key, Value)

Source§

fn extend<Items>(&mut self, items: Items)
where Items: IntoIterator<Item = Self::Item>,

Implementors§