pub struct AsyncWriteSendStream<W>(/* private fields */);
Expand description
Utility to convert a [tokio::io::AsyncWrite] into an SendStream.
Implementations§
Source§impl<W: SendStreamSpecific> AsyncWriteSendStream<W>
impl<W: SendStreamSpecific> AsyncWriteSendStream<W>
Source§impl<W: SendStreamSpecific> AsyncWriteSendStream<W>
impl<W: SendStreamSpecific> 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 copy 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: SendStreamSpecific> SendStream for AsyncWriteSendStream<W>
impl<W: SendStreamSpecific> 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.Source§async fn send<const L: usize>(&mut self, buf: &[u8; L]) -> Result<()>
async fn send<const L: usize>(&mut self, buf: &[u8; L]) -> Result<()>
Send that sends a fixed sized buffer.
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