Struct combine::stream::state::IndexPositioner
source · 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§fn 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 ==
.source§impl<Item> Positioner<Item> for IndexPositionerwhere
Item: PartialEq + Clone,
impl<Item> Positioner<Item> for IndexPositionerwhere Item: PartialEq + Clone,
source§impl<Item, Range> RangePositioner<Item, Range> for IndexPositionerwhere
Item: PartialEq + Clone,
Range: PartialEq + Clone + Range,
impl<Item, Range> RangePositioner<Item, Range> for IndexPositionerwhere Item: PartialEq + Clone, Range: PartialEq + Clone + Range,
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 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