pub struct IndexPositioner(_);
Expand description
The IndexPositioner<Item, Range>
struct maintains the current index into the stream Input
. The
initial index is index 0. Each Item
committed increments the index by 1; each range
committed
increments the position by range.len()
.
Implementations
sourceimpl IndexPositioner
impl IndexPositioner
pub fn new() -> IndexPositioner
pub fn new_with_position(position: usize) -> IndexPositioner
Trait Implementations
sourceimpl Clone for IndexPositioner
impl Clone for IndexPositioner
sourcefn clone(&self) -> IndexPositioner
fn clone(&self) -> IndexPositioner
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for IndexPositioner
impl Debug for IndexPositioner
sourceimpl Default for IndexPositioner
impl Default for IndexPositioner
sourcefn default() -> IndexPositioner
fn default() -> IndexPositioner
Returns the “default value” for a type. Read more
sourceimpl PartialEq<IndexPositioner> for IndexPositioner
impl PartialEq<IndexPositioner> for IndexPositioner
sourcefn eq(&self, other: &IndexPositioner) -> bool
fn eq(&self, other: &IndexPositioner) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &IndexPositioner) -> bool
fn ne(&self, other: &IndexPositioner) -> bool
This method tests for !=
.
sourceimpl<Item> Positioner<Item> for IndexPositioner where
Item: Clone,
impl<Item> Positioner<Item> for IndexPositioner where
Item: Clone,
type Checkpoint = IndexPositioner
sourcefn update(&mut self, _item: &Item)
fn update(&mut self, _item: &Item)
Updates the position given that token
has been taken from the stream
fn checkpoint(&self) -> Self::Checkpoint
fn reset(&mut self, checkpoint: Self::Checkpoint)
sourceimpl<Item, Range> RangePositioner<Item, Range> for IndexPositioner where
Item: Clone,
Range: Clone + Range,
impl<Item, Range> RangePositioner<Item, Range> for IndexPositioner where
Item: Clone,
Range: Clone + Range,
sourcefn update_range(&mut self, range: &Range)
fn update_range(&mut self, range: &Range)
Updates the position given that range
has been taken from the stream
impl StructuralPartialEq for IndexPositioner
Auto Trait Implementations
impl RefUnwindSafe for IndexPositioner
impl Send for IndexPositioner
impl Sync for IndexPositioner
impl Unpin for IndexPositioner
impl UnwindSafe for IndexPositioner
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more