Extend

Trait Extend 

Source
pub trait Extend<IN> {
    type Error;

    // Required method
    fn extend(
        &mut self,
        into_iter: impl IntoIterator<Item = IN>,
    ) -> Result<(), Self::Error>;
}
Expand description

See Extend::extend for more information.

Required Associated Types§

Source

type Error

Error

Required Methods§

Source

fn extend( &mut self, into_iter: impl IntoIterator<Item = IN>, ) -> Result<(), Self::Error>

Returns an mutable inner reference of a derived element.

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<IN, T> Extend<IN> for &mut T
where T: Extend<IN>,

Source§

type Error = <T as Extend<IN>>::Error

Source§

fn extend( &mut self, into_iter: impl IntoIterator<Item = IN>, ) -> Result<(), Self::Error>

Source§

impl<T> Extend<T> for Option<T>

let mut opt = None;
cl_aux::Extend::extend(&mut opt, [3]).unwrap();
assert_eq!(opt, Some(3));
Source§

type Error = Error

Source§

fn extend( &mut self, into_iter: impl IntoIterator<Item = T>, ) -> Result<(), Self::Error>

Source§

impl<T> Extend<T> for ()

Source§

type Error = Error

Source§

fn extend(&mut self, _: impl IntoIterator<Item = T>) -> Result<(), Self::Error>

Implementors§