[][src]Trait collectable::TryExtend

pub trait TryExtend<A> {
    type Error;
    fn try_extend<T>(&mut self, iter: &mut T) -> Result<(), Self::Error>
    where
        T: Iterator<Item = A>
; fn try_extend_from_slice(&mut self, slice: &[A]) -> Result<(), Self::Error>
    where
        A: Clone
, { ... } }

Fallible equivalent of core::iter::Extend - extends a collection with the contents of an iterator, but with the option to return an error in the event the container's capacity has been exceeded.

Associated Types

type Error

Error type.

Loading content...

Required methods

fn try_extend<T>(&mut self, iter: &mut T) -> Result<(), Self::Error> where
    T: Iterator<Item = A>, 

Try to extend the collection from the given iterator.

Loading content...

Provided methods

fn try_extend_from_slice(&mut self, slice: &[A]) -> Result<(), Self::Error> where
    A: Clone

Try to extend the collection from the given slice.

Loading content...

Implementors

Loading content...