pub trait TrBuffPeeker<T: Clone = u8> {
type BuffRef<'a>: Deref<Target = [T]>
where Self: 'a;
type Err;
type PeekAsync<'a>: TrIntoFutureMayCancel<'a, MayCancelOutput = Result<Self::BuffRef<'a>, Self::Err>>
where Self: 'a;
// Required methods
fn can_peek(&mut self, skip: usize) -> bool;
fn peek_async(&mut self, skip: usize) -> Self::PeekAsync<'_>;
}Expand description
Buffer owner that will lend slice for peeking (without moving cursor).
Required Associated Types§
type BuffRef<'a>: Deref<Target = [T]> where Self: 'a
type Err
type PeekAsync<'a>: TrIntoFutureMayCancel<'a, MayCancelOutput = Result<Self::BuffRef<'a>, Self::Err>> where Self: 'a
Required Methods§
fn can_peek(&mut self, skip: usize) -> bool
fn peek_async(&mut self, skip: usize) -> Self::PeekAsync<'_>
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.