Trait combine::stream::ResetStream
source · [−]pub trait ResetStream: StreamOnce {
type Checkpoint: Clone;
fn checkpoint(&self) -> Self::Checkpoint;
fn reset(&mut self, checkpoint: Self::Checkpoint) -> Result<(), Self::Error>;
}
Expand description
A StreamOnce
which can create checkpoints which the stream can be reset to
Required Associated Types
type Checkpoint: Clone
Required Methods
fn checkpoint(&self) -> Self::Checkpoint
fn checkpoint(&self) -> Self::Checkpoint
Creates a Checkpoint
at the current position which can be used to reset the stream
later to the current position
Implementations on Foreign Types
sourceimpl<'a> ResetStream for &'a str where
Self: StreamOnce,
impl<'a> ResetStream for &'a str where
Self: StreamOnce,
type Checkpoint = &'a str
fn checkpoint(&self) -> Self
fn reset(&mut self, checkpoint: Self) -> Result<(), Self::Error>
sourceimpl<'a, T> ResetStream for &'a [T] where
Self: StreamOnce,
impl<'a, T> ResetStream for &'a [T] where
Self: StreamOnce,
type Checkpoint = &'a [T]
fn checkpoint(&self) -> Self
fn reset(&mut self, checkpoint: Self) -> Result<(), Self::Error>
sourceimpl<'a, I> ResetStream for &'a mut I where
I: ResetStream + ?Sized,
impl<'a, I> ResetStream for &'a mut I where
I: ResetStream + ?Sized,
type Checkpoint = <I as ResetStream>::Checkpoint
fn checkpoint(&self) -> Self::Checkpoint
fn reset(&mut self, checkpoint: Self::Checkpoint) -> Result<(), Self::Error>
Implementors
sourceimpl<'a, T> ResetStream for SliceStream<'a, T> where
Self: StreamOnce,
impl<'a, T> ResetStream for SliceStream<'a, T> where
Self: StreamOnce,
type Checkpoint = SliceStream<'a, T>
sourceimpl<Input> ResetStream for combine::stream::buffered::Stream<Input> where
Input: Positioned,
Available on crate feature alloc
only.
impl<Input> ResetStream for combine::stream::buffered::Stream<Input> where
Input: Positioned,
Available on crate feature
alloc
only.type Checkpoint = usize
sourceimpl<Input, X, S> ResetStream for combine::stream::position::Stream<Input, X> where
Input: ResetStream,
X: Positioner<Input::Token>,
S: StreamError<Input::Token, Input::Range>,
Input::Error: ParseError<Input::Token, Input::Range, X::Position, StreamError = S>,
Input::Error: ParseError<Input::Token, Input::Range, Input::Position, StreamError = S>,
impl<Input, X, S> ResetStream for combine::stream::position::Stream<Input, X> where
Input: ResetStream,
X: Positioner<Input::Token>,
S: StreamError<Input::Token, Input::Range>,
Input::Error: ParseError<Input::Token, Input::Range, X::Position, StreamError = S>,
Input::Error: ParseError<Input::Token, Input::Range, Input::Position, StreamError = S>,
type Checkpoint = Stream<<Input as ResetStream>::Checkpoint, <X as Positioner<<Input as StreamOnce>::Token>>::Checkpoint>
sourceimpl<S> ResetStream for combine::stream::easy::Stream<S> where
S: ResetStream + Positioned,
S::Token: PartialEq,
S::Range: PartialEq,
Available on crate feature std
only.
impl<S> ResetStream for combine::stream::easy::Stream<S> where
S: ResetStream + Positioned,
S::Token: PartialEq,
S::Range: PartialEq,
Available on crate feature
std
only.