Trait PeekIoProvider
pub trait PeekIoProvider: Send + 'static {
type PeekIo: Io;
type Mapped<PeekedIo: Io>: Send + 'static;
// Required methods
fn peek_io_mut(&mut self) -> &mut Self::PeekIo;
fn map_peek_io<PeekedIo, F>(self, map: F) -> Self::Mapped<PeekedIo>
where PeekedIo: Io,
F: FnOnce(Self::PeekIo) -> PeekedIo;
}Expand description
Required Associated Types§
Required Methods§
fn peek_io_mut(&mut self) -> &mut Self::PeekIo
fn peek_io_mut(&mut self) -> &mut Self::PeekIo
Retrieve a mutable reference to the Peekable type.
fn map_peek_io<PeekedIo, F>(self, map: F) -> Self::Mapped<PeekedIo>
fn map_peek_io<PeekedIo, F>(self, map: F) -> Self::Mapped<PeekedIo>
Once peeking is finished one can reproduce self
by mapping the Peeked Io type and produce a new type,
usually with the peeked data in-memory as prefix.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.