pub struct AsyncWriteSendStream<W>(/* private fields */);Expand description
Utility to convert a [tokio::io::AsyncWrite] into an SendStream.
Implementations§
Source§impl<W: AsyncWriteSendStreamExtra> AsyncWriteSendStream<W>
 
impl<W: AsyncWriteSendStreamExtra> AsyncWriteSendStream<W>
Source§impl<W: AsyncWriteSendStreamExtra> AsyncWriteSendStream<W>
 
impl<W: AsyncWriteSendStreamExtra> AsyncWriteSendStream<W>
pub fn into_inner(self) -> W
Trait Implementations§
Source§impl<W: Clone> Clone for AsyncWriteSendStream<W>
 
impl<W: Clone> Clone for AsyncWriteSendStream<W>
Source§fn clone(&self) -> AsyncWriteSendStream<W>
 
fn clone(&self) -> AsyncWriteSendStream<W>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreSource§impl<W: Debug> Debug for AsyncWriteSendStream<W>
 
impl<W: Debug> Debug for AsyncWriteSendStream<W>
Source§impl<W: AsyncWriteSendStreamExtra> SendStream for AsyncWriteSendStream<W>
 
impl<W: AsyncWriteSendStreamExtra> SendStream for AsyncWriteSendStream<W>
Source§async fn send_bytes(&mut self, bytes: Bytes) -> Result<()>
 
async fn send_bytes(&mut self, bytes: Bytes) -> Result<()>
Send bytes to the stream. This takes a 
Bytes because iroh can directly use them. Read moreSource§async fn sync(&mut self) -> Result<()>
 
async fn sync(&mut self) -> Result<()>
Sync the stream. Not needed for iroh, but needed for intermediate buffered streams such as compression.
Auto Trait Implementations§
impl<W> Freeze for AsyncWriteSendStream<W>where
    W: Freeze,
impl<W> RefUnwindSafe for AsyncWriteSendStream<W>where
    W: RefUnwindSafe,
impl<W> Send for AsyncWriteSendStream<W>where
    W: Send,
impl<W> Sync for AsyncWriteSendStream<W>where
    W: Sync,
impl<W> Unpin for AsyncWriteSendStream<W>where
    W: Unpin,
impl<W> UnwindSafe for AsyncWriteSendStream<W>where
    W: UnwindSafe,
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