pub trait NetBenchReceiveStream: Send {
// Required methods
fn read<'life0, 'life1, 'async_trait>(
&'life0 mut self,
bytes: &'life1 mut [u8],
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn read_exact<'life0, 'life1, 'async_trait>(
&'life0 mut self,
bytes: &'life1 mut [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn cancel(&mut self);
}Expand description
Receiving half of one host-routed reliable stream.
Required Methods§
Sourcefn read<'life0, 'life1, 'async_trait>(
&'life0 mut self,
bytes: &'life1 mut [u8],
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read<'life0, 'life1, 'async_trait>(
&'life0 mut self,
bytes: &'life1 mut [u8],
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Reads available bytes, returning zero after the peer finishes.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".