Enum itertools::Position
[−]
[src]
pub enum Position<T> { First(T), Middle(T), Last(T), Only(T), }
A value yielded by WithPosition
.
Indicates the position of this element in the iterator results.
See .with_position()
for more information.
Variants
First(T)
This is the first element.
Middle(T)
This is neither the first nor the last element.
Last(T)
This is the last element.
Only(T)
This is the only element.
Methods
impl<T> Position<T>
[src]
impl<T> Position<T>
pub fn into_inner(self) -> T
[src]
pub fn into_inner(self) -> T
Return the inner value.
Trait Implementations
impl<T: Copy> Copy for Position<T>
[src]
impl<T: Copy> Copy for Position<T>
impl<T: Clone> Clone for Position<T>
[src]
impl<T: Clone> Clone for Position<T>
fn clone(&self) -> Position<T>
[src]
fn clone(&self) -> Position<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<T: Debug> Debug for Position<T>
[src]
impl<T: Debug> Debug for Position<T>
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T: PartialEq> PartialEq for Position<T>
[src]
impl<T: PartialEq> PartialEq for Position<T>