pub trait ResetStream: StreamOnce {
type Checkpoint: Clone;
// Required methods
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§
Sourcefn 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§
Source§impl<'a> ResetStream for &'a strwhere
Self: StreamOnce,
impl<'a> ResetStream for &'a strwhere
Self: StreamOnce,
Source§impl<'a, I> ResetStream for &'a mut Iwhere
I: ResetStream + ?Sized,
impl<'a, I> ResetStream for &'a mut Iwhere
I: ResetStream + ?Sized,
type Checkpoint = <I as ResetStream>::Checkpoint
fn checkpoint(&self) -> Self::Checkpoint
fn reset(&mut self, checkpoint: Self::Checkpoint) -> Result<(), Self::Error>
Source§impl<'a, T> ResetStream for &'a [T]where
Self: StreamOnce,
impl<'a, T> ResetStream for &'a [T]where
Self: StreamOnce,
Implementors§
Source§impl<'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>
Source§impl<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
Source§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> + 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> + ParseError<Input::Token, Input::Range, Input::Position, StreamError = S>,
type Checkpoint = Stream<<Input as ResetStream>::Checkpoint, <X as Positioner<<Input as StreamOnce>::Token>>::Checkpoint>
Source§impl<S> ResetStream for combine::easy::Stream<S>
Available on crate feature std
only.
impl<S> ResetStream for combine::easy::Stream<S>
Available on crate feature
std
only.