pub struct IndexPositioner(/* private fields */);
Expand description
The IndexPositioner<Item, Range>
struct maintains the current index into the stream I
. The
initial index is index 0. Each Item
consumed increments the index by 1; each range
consumed
increments the position by range.len()
.
Implementations§
Source§impl IndexPositioner
impl IndexPositioner
pub fn new() -> IndexPositioner
pub fn new_with_position(position: usize) -> IndexPositioner
Trait Implementations§
Source§impl Clone for IndexPositioner
impl Clone for IndexPositioner
Source§fn clone(&self) -> IndexPositioner
fn clone(&self) -> IndexPositioner
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for IndexPositioner
impl Debug for IndexPositioner
Source§impl Default for IndexPositioner
impl Default for IndexPositioner
Source§fn default() -> IndexPositioner
fn default() -> IndexPositioner
Returns the “default value” for a type. Read more
Source§impl PartialEq for IndexPositioner
impl PartialEq for IndexPositioner
Source§impl<Item> Positioner<Item> for IndexPositioner
impl<Item> Positioner<Item> for IndexPositioner
Source§impl<Item, Range> RangePositioner<Item, Range> for IndexPositioner
impl<Item, Range> RangePositioner<Item, Range> for IndexPositioner
Source§fn update_range(&mut self, range: &Range)
fn update_range(&mut self, range: &Range)
Updates the position given that
range
has been taken from the streamSource§impl Resetable for IndexPositioner
impl Resetable for IndexPositioner
type Checkpoint = IndexPositioner
fn checkpoint(&self) -> Self
fn reset(&mut self, checkpoint: Self)
impl StructuralPartialEq for IndexPositioner
Auto Trait Implementations§
impl Freeze for IndexPositioner
impl RefUnwindSafe for IndexPositioner
impl Send for IndexPositioner
impl Sync for IndexPositioner
impl Unpin for IndexPositioner
impl UnwindSafe for IndexPositioner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more