pub struct StreamSend<'a> { /* private fields */ }
Expand description
borrowed half of an async stream that can be used for sending data
Implementations§
Source§impl<'a> StreamSend<'a>
impl<'a> StreamSend<'a>
pub fn new( writer: WriteHalf<'a>, remote_addr: SocketAddr, header: &'a StreamHeader, ) -> Self
Trait Implementations§
Source§impl<'a> AsyncSend for StreamSend<'a>
impl<'a> AsyncSend for StreamSend<'a>
Source§fn send<'life0, 'life1, 'async_trait>(
&'life0 mut self,
buffer: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<usize, NetworkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send<'life0, 'life1, 'async_trait>(
&'life0 mut self,
buffer: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<usize, NetworkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
send data to the peer
type SendError = NetworkError
fn remote_addr(&self) -> &SocketAddr
Auto Trait Implementations§
impl<'a> Freeze for StreamSend<'a>
impl<'a> !RefUnwindSafe for StreamSend<'a>
impl<'a> Send for StreamSend<'a>
impl<'a> Sync for StreamSend<'a>
impl<'a> Unpin for StreamSend<'a>
impl<'a> !UnwindSafe for StreamSend<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more