Trait combine::stream::ResetStream
source · 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
Object Safety§
This trait is not object safe.
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::stream::easy::Stream<S>
Available on crate feature std
only.
impl<S> ResetStream for combine::stream::easy::Stream<S>
Available on crate feature
std
only.