pub trait Peek {
// Provided method
fn try_peek<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_buf: &'life1 mut [u8],
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}
Expand description
The ability peek data before consuming it
Provided Methods§
Sourcefn try_peek<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_buf: &'life1 mut [u8],
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn try_peek<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_buf: &'life1 mut [u8],
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Peek data but not consuming it. This call should block until some data
is sent.
Return false
if peeking is not supported/allowed.