pub struct Window<B> { /* private fields */ }
Expand description
A pattern which represents a window of a byte oriented buffer.
Implementations§
Source§impl<B> Window<B>
impl<B> Window<B>
Trait Implementations§
Source§impl<B> AllowPartial for Window<B>
impl<B> AllowPartial for Window<B>
Source§fn allow_partial(self) -> PartialBuf<Self>
fn allow_partial(self) -> PartialBuf<Self>
Indicates that this pattern is partially evaluable.
Source§impl<R: Read, B: AsMut<[u8]>> AsyncMatch<PatternReader<R>> for Window<B>
impl<R: Read, B: AsMut<[u8]>> AsyncMatch<PatternReader<R>> for Window<B>
Source§type Future = ReadBuf<R, Window<B>>
type Future = ReadBuf<R, Window<B>>
The future type which will produce a value
Self::Value
by
matching this pattern and a matcher M
.Source§fn async_match(self, matcher: PatternReader<R>) -> Self::Future
fn async_match(self, matcher: PatternReader<R>) -> Self::Future
Creates a future which will produce a
Self::Value
by
matching this pattern and the matcher
.Source§fn into_stream(self, matcher: M) -> MatchStream<M, Self>where
Self: Clone,
fn into_stream(self, matcher: M) -> MatchStream<M, Self>where
Self: Clone,
Consumes this pattern and the
matcher
,
returning a stream which will produce a sequence of matched values. Read moreSource§impl<W: Write, B: AsRef<[u8]>> AsyncMatch<PatternWriter<W>> for Window<B>
impl<W: Write, B: AsRef<[u8]>> AsyncMatch<PatternWriter<W>> for Window<B>
Source§type Future = WriteBuf<W, Window<B>>
type Future = WriteBuf<W, Window<B>>
The future type which will produce a value
Self::Value
by
matching this pattern and a matcher M
.Source§fn async_match(self, matcher: PatternWriter<W>) -> Self::Future
fn async_match(self, matcher: PatternWriter<W>) -> Self::Future
Creates a future which will produce a
Self::Value
by
matching this pattern and the matcher
.Source§fn into_stream(self, matcher: M) -> MatchStream<M, Self>where
Self: Clone,
fn into_stream(self, matcher: M) -> MatchStream<M, Self>where
Self: Clone,
Consumes this pattern and the
matcher
,
returning a stream which will produce a sequence of matched values. Read moreSource§impl<T> ExternalSize for Window<T>
impl<T> ExternalSize for Window<T>
Source§fn external_size(&self) -> usize
fn external_size(&self) -> usize
Calculates external byte size issued when
an I/O operation is performed on this.
Source§impl<B> Pattern for Window<B>
impl<B> Pattern for Window<B>
Source§fn then<F, P, E>(self, f: F) -> Then<Self, F, E>
fn then<F, P, E>(self, f: F) -> Then<Self, F, E>
Takes a closure which maps a
Result<Self::Value>
to a pattern, and
creates a pattern which calls that closure on the evaluation result of self
.Source§fn and_then<F, P>(self, f: F) -> AndThen<Self, F>
fn and_then<F, P>(self, f: F) -> AndThen<Self, F>
Takes a closure which maps a value to a pattern, and
creates a pattern which calls that closure if the evaluation of
self
was succeeded.Source§fn or_else<F, P, E>(self, f: F) -> OrElse<Self, F, E>where
F: FnOnce(E) -> P,
fn or_else<F, P, E>(self, f: F) -> OrElse<Self, F, E>where
F: FnOnce(E) -> P,
Takes a closure which maps an error to a pattern, and
creates a pattern which calls that closure if the evaluation of
self
failed.Source§fn or<P>(self, other: P) -> Or<Self, P>
fn or<P>(self, other: P) -> Or<Self, P>
Takes a pattern
other
which will be used if the evaluation of self
is failed.Source§fn map<F, T>(self, f: F) -> Map<Self, F>
fn map<F, T>(self, f: F) -> Map<Self, F>
Takes a closure which maps a value to another value, and
creates a pattern which calls that closure on the evaluated value of
self
.Source§fn chain<P>(self, other: P) -> Chain<Self, P>where
P: Pattern,
fn chain<P>(self, other: P) -> Chain<Self, P>where
P: Pattern,
Takes two patterns and creates a new pattern over both in sequence. Read more
Source§fn repeat(self) -> Repeat<Self>where
Self: Clone,
fn repeat(self) -> Repeat<Self>where
Self: Clone,
Creates
Repeat
pattern to represent an infinite stream of this pattern.Auto Trait Implementations§
impl<B> Freeze for Window<B>where
B: Freeze,
impl<B> RefUnwindSafe for Window<B>where
B: RefUnwindSafe,
impl<B> Send for Window<B>where
B: Send,
impl<B> Sync for Window<B>where
B: Sync,
impl<B> Unpin for Window<B>where
B: Unpin,
impl<B> UnwindSafe for Window<B>where
B: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<R, T> ReadFrom<R> for T
impl<R, T> ReadFrom<R> for T
Source§fn read_from(self, reader: R) -> ReadPattern<Self, R>
fn read_from(self, reader: R) -> ReadPattern<Self, R>
Creates a future instance to read a value of the pattern from
reader
. Read moreSource§fn sync_read_from(self, reader: R) -> Result<Self::Value>
fn sync_read_from(self, reader: R) -> Result<Self::Value>
Synchronous version of the
ReadFrom::read_from
method.Source§fn into_stream(self, reader: R) -> ReadStream<R, Self>where
Self: Clone,
fn into_stream(self, reader: R) -> ReadStream<R, Self>where
Self: Clone,
Consumes this pattern and the
reader
,
returning a stream which will produce a sequence of read values. Read moreSource§impl<W, T> WriteInto<W> for T
impl<W, T> WriteInto<W> for T
Source§fn write_into(self, writer: W) -> WritePattern<Self, W>
fn write_into(self, writer: W) -> WritePattern<Self, W>
Creates a future instance to write a value of the pattern to
writer
. Read moreSource§fn sync_write_into(self, writer: W) -> Result<Self::Value>
fn sync_write_into(self, writer: W) -> Result<Self::Value>
Synchronous version of the
WriteInto::write_into
method.