Skip to main content

AsyncRecvStreamHandle

Trait AsyncRecvStreamHandle 

Source
pub trait AsyncRecvStreamHandle: AsyncStreamHandle {
Show 13 methods // Required methods fn read<'a>( &'a self, dst: &'a mut [u8], ) -> AsyncBoxFuture<'a, Result<usize>>; fn read_timeout<'a>( &'a self, dst: &'a mut [u8], timeout: Duration, ) -> AsyncBoxFuture<'a, Result<usize>>; fn is_read_closed(&self) -> bool; fn close_read(&self) -> AsyncBoxFuture<'_, Result<()>>; fn cancel_read(&self, code: u64) -> AsyncBoxFuture<'_, Result<()>>; // Provided methods fn read_vectored<'a>( &'a self, dsts: &'a mut [IoSliceMut<'_>], ) -> AsyncBoxFuture<'a, Result<usize>> { ... } fn read_vectored_timeout<'a>( &'a self, dsts: &'a mut [IoSliceMut<'_>], timeout: Duration, ) -> AsyncBoxFuture<'a, Result<usize>> { ... } fn read_exact<'a>( &'a self, dst: &'a mut [u8], ) -> AsyncBoxFuture<'a, Result<()>> { ... } fn read_exact_timeout<'a>( &'a self, dst: &'a mut [u8], timeout: Duration, ) -> AsyncBoxFuture<'a, Result<()>> { ... } fn set_read_deadline(&self, deadline: Option<Instant>) -> Result<()> { ... } fn set_read_timeout(&self, timeout: Option<Duration>) -> Result<()> { ... } fn read_to_end<'a>( &'a self, dst: &'a mut Vec<u8>, ) -> AsyncBoxFuture<'a, Result<usize>> { ... } fn read_to_end_limited( &self, max_bytes: usize, ) -> AsyncBoxFuture<'_, Result<Vec<u8>>> { ... }
}
Expand description

Runtime-neutral receive stream operations.

Required Methods§

Source

fn read<'a>(&'a self, dst: &'a mut [u8]) -> AsyncBoxFuture<'a, Result<usize>>

Source

fn read_timeout<'a>( &'a self, dst: &'a mut [u8], timeout: Duration, ) -> AsyncBoxFuture<'a, Result<usize>>

Source

fn is_read_closed(&self) -> bool

Source

fn close_read(&self) -> AsyncBoxFuture<'_, Result<()>>

Source

fn cancel_read(&self, code: u64) -> AsyncBoxFuture<'_, Result<()>>

Provided Methods§

Source

fn read_vectored<'a>( &'a self, dsts: &'a mut [IoSliceMut<'_>], ) -> AsyncBoxFuture<'a, Result<usize>>

Source

fn read_vectored_timeout<'a>( &'a self, dsts: &'a mut [IoSliceMut<'_>], timeout: Duration, ) -> AsyncBoxFuture<'a, Result<usize>>

Source

fn read_exact<'a>(&'a self, dst: &'a mut [u8]) -> AsyncBoxFuture<'a, Result<()>>

Source

fn read_exact_timeout<'a>( &'a self, dst: &'a mut [u8], timeout: Duration, ) -> AsyncBoxFuture<'a, Result<()>>

Source

fn set_read_deadline(&self, deadline: Option<Instant>) -> Result<()>

Source

fn set_read_timeout(&self, timeout: Option<Duration>) -> Result<()>

Source

fn read_to_end<'a>( &'a self, dst: &'a mut Vec<u8>, ) -> AsyncBoxFuture<'a, Result<usize>>

Source

fn read_to_end_limited( &self, max_bytes: usize, ) -> AsyncBoxFuture<'_, Result<Vec<u8>>>

Implementations on Foreign Types§

Source§

impl<T> AsyncRecvStreamHandle for &T

Source§

fn read<'a>(&'a self, dst: &'a mut [u8]) -> AsyncBoxFuture<'a, Result<usize>>

Source§

fn read_vectored<'a>( &'a self, dsts: &'a mut [IoSliceMut<'_>], ) -> AsyncBoxFuture<'a, Result<usize>>

Source§

fn read_timeout<'a>( &'a self, dst: &'a mut [u8], timeout: Duration, ) -> AsyncBoxFuture<'a, Result<usize>>

Source§

fn read_vectored_timeout<'a>( &'a self, dsts: &'a mut [IoSliceMut<'_>], timeout: Duration, ) -> AsyncBoxFuture<'a, Result<usize>>

Source§

fn read_exact<'a>(&'a self, dst: &'a mut [u8]) -> AsyncBoxFuture<'a, Result<()>>

Source§

fn read_exact_timeout<'a>( &'a self, dst: &'a mut [u8], timeout: Duration, ) -> AsyncBoxFuture<'a, Result<()>>

Source§

fn is_read_closed(&self) -> bool

Source§

fn set_read_deadline(&self, deadline: Option<Instant>) -> Result<()>

Source§

fn read_to_end<'a>( &'a self, dst: &'a mut Vec<u8>, ) -> AsyncBoxFuture<'a, Result<usize>>

Source§

fn read_to_end_limited( &self, max_bytes: usize, ) -> AsyncBoxFuture<'_, Result<Vec<u8>>>

Source§

fn close_read(&self) -> AsyncBoxFuture<'_, Result<()>>

Source§

fn cancel_read(&self, code: u64) -> AsyncBoxFuture<'_, Result<()>>

Source§

impl<T> AsyncRecvStreamHandle for &mut T

Source§

fn read<'a>(&'a self, dst: &'a mut [u8]) -> AsyncBoxFuture<'a, Result<usize>>

Source§

fn read_vectored<'a>( &'a self, dsts: &'a mut [IoSliceMut<'_>], ) -> AsyncBoxFuture<'a, Result<usize>>

Source§

fn read_timeout<'a>( &'a self, dst: &'a mut [u8], timeout: Duration, ) -> AsyncBoxFuture<'a, Result<usize>>

Source§

fn read_vectored_timeout<'a>( &'a self, dsts: &'a mut [IoSliceMut<'_>], timeout: Duration, ) -> AsyncBoxFuture<'a, Result<usize>>

Source§

fn read_exact<'a>(&'a self, dst: &'a mut [u8]) -> AsyncBoxFuture<'a, Result<()>>

Source§

fn read_exact_timeout<'a>( &'a self, dst: &'a mut [u8], timeout: Duration, ) -> AsyncBoxFuture<'a, Result<()>>

Source§

fn is_read_closed(&self) -> bool

Source§

fn set_read_deadline(&self, deadline: Option<Instant>) -> Result<()>

Source§

fn read_to_end<'a>( &'a self, dst: &'a mut Vec<u8>, ) -> AsyncBoxFuture<'a, Result<usize>>

Source§

fn read_to_end_limited( &self, max_bytes: usize, ) -> AsyncBoxFuture<'_, Result<Vec<u8>>>

Source§

fn close_read(&self) -> AsyncBoxFuture<'_, Result<()>>

Source§

fn cancel_read(&self, code: u64) -> AsyncBoxFuture<'_, Result<()>>

Source§

impl<T> AsyncRecvStreamHandle for Box<T>

Source§

fn read<'a>(&'a self, dst: &'a mut [u8]) -> AsyncBoxFuture<'a, Result<usize>>

Source§

fn read_vectored<'a>( &'a self, dsts: &'a mut [IoSliceMut<'_>], ) -> AsyncBoxFuture<'a, Result<usize>>

Source§

fn read_timeout<'a>( &'a self, dst: &'a mut [u8], timeout: Duration, ) -> AsyncBoxFuture<'a, Result<usize>>

Source§

fn read_vectored_timeout<'a>( &'a self, dsts: &'a mut [IoSliceMut<'_>], timeout: Duration, ) -> AsyncBoxFuture<'a, Result<usize>>

Source§

fn read_exact<'a>(&'a self, dst: &'a mut [u8]) -> AsyncBoxFuture<'a, Result<()>>

Source§

fn read_exact_timeout<'a>( &'a self, dst: &'a mut [u8], timeout: Duration, ) -> AsyncBoxFuture<'a, Result<()>>

Source§

fn is_read_closed(&self) -> bool

Source§

fn set_read_deadline(&self, deadline: Option<Instant>) -> Result<()>

Source§

fn read_to_end<'a>( &'a self, dst: &'a mut Vec<u8>, ) -> AsyncBoxFuture<'a, Result<usize>>

Source§

fn read_to_end_limited( &self, max_bytes: usize, ) -> AsyncBoxFuture<'_, Result<Vec<u8>>>

Source§

fn close_read(&self) -> AsyncBoxFuture<'_, Result<()>>

Source§

fn cancel_read(&self, code: u64) -> AsyncBoxFuture<'_, Result<()>>

Source§

impl<T> AsyncRecvStreamHandle for Arc<T>

Source§

fn read<'a>(&'a self, dst: &'a mut [u8]) -> AsyncBoxFuture<'a, Result<usize>>

Source§

fn read_vectored<'a>( &'a self, dsts: &'a mut [IoSliceMut<'_>], ) -> AsyncBoxFuture<'a, Result<usize>>

Source§

fn read_timeout<'a>( &'a self, dst: &'a mut [u8], timeout: Duration, ) -> AsyncBoxFuture<'a, Result<usize>>

Source§

fn read_vectored_timeout<'a>( &'a self, dsts: &'a mut [IoSliceMut<'_>], timeout: Duration, ) -> AsyncBoxFuture<'a, Result<usize>>

Source§

fn read_exact<'a>(&'a self, dst: &'a mut [u8]) -> AsyncBoxFuture<'a, Result<()>>

Source§

fn read_exact_timeout<'a>( &'a self, dst: &'a mut [u8], timeout: Duration, ) -> AsyncBoxFuture<'a, Result<()>>

Source§

fn is_read_closed(&self) -> bool

Source§

fn set_read_deadline(&self, deadline: Option<Instant>) -> Result<()>

Source§

fn read_to_end<'a>( &'a self, dst: &'a mut Vec<u8>, ) -> AsyncBoxFuture<'a, Result<usize>>

Source§

fn read_to_end_limited( &self, max_bytes: usize, ) -> AsyncBoxFuture<'_, Result<Vec<u8>>>

Source§

fn close_read(&self) -> AsyncBoxFuture<'_, Result<()>>

Source§

fn cancel_read(&self, code: u64) -> AsyncBoxFuture<'_, Result<()>>

Implementors§