Trait enterpolation::DiscreteGenerator
source · pub trait DiscreteGenerator: Generator<usize> {
// Required method
fn len(&self) -> usize;
// Provided methods
fn first(&self) -> Option<Self::Output> { ... }
fn last(&self) -> Option<Self::Output> { ... }
fn is_empty(&self) -> bool { ... }
fn into_iter(self) -> IntoIter<Self>
where Self: Sized { ... }
fn iter(&self) -> IntoIter<&Self> { ... }
fn repeat(self) -> Repeat<Self>
where Self: Sized { ... }
}
Expand description
Required Methods§
Provided Methods§
sourcefn first(&self) -> Option<Self::Output>
fn first(&self) -> Option<Self::Output>
Returns the first element of the generator, or None
if it is empty.
sourcefn last(&self) -> Option<Self::Output>
fn last(&self) -> Option<Self::Output>
Returns the last element of the generator, or None
if it is empty.