Trait InitIterExt

Source
pub trait InitIterExt<T> {
    // Required methods
    fn fill(self, value: T)
       where T: Clone;
    fn fill_with<F>(self, func: F)
       where F: FnMut() -> T;
    fn fill_default(self)
       where T: Default;
}

Required Methods§

Source

fn fill(self, value: T)
where T: Clone,

Fill the rest of the iterator with a clone()d value.

Source

fn fill_with<F>(self, func: F)
where F: FnMut() -> T,

Fill the rest of the iterator with output from a function.

Source

fn fill_default(self)
where T: Default,

Fill the rest of the iterator with default()

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.

Implementors§

Source§

impl<'a, T, I> InitIterExt<T> for I
where I: Iterator<Item = Init<'a, T>>, T: 'a,