Struct iroh_io::TokioStreamWriter
source · pub struct TokioStreamWriter<T>(pub T);Expand description
Utility to convert a tokio::io::AsyncWrite into an AsyncStreamWriter.
Tuple Fields§
§0: TTrait Implementations§
source§impl<T: AsyncWrite + Unpin> AsyncStreamWriter for TokioStreamWriter<T>
impl<T: AsyncWrite + Unpin> AsyncStreamWriter for TokioStreamWriter<T>
§type WriteFuture<'a> = Write<'a, T>
where
Self: 'a
type WriteFuture<'a> = Write<'a, T> where Self: 'a
Future returned by write
source§fn write<'a>(&'a mut self, data: &'a [u8]) -> Self::WriteFuture<'a>
fn write<'a>(&'a mut self, data: &'a [u8]) -> Self::WriteFuture<'a>
Write the entire slice. Read more
§type WriteBytesFuture<'a> = WriteBytes<'a, T>
where
Self: 'a
type WriteBytesFuture<'a> = WriteBytes<'a, T> where Self: 'a
Future returned by write
source§fn write_bytes(&mut self, data: Bytes) -> Self::WriteBytesFuture<'_>
fn write_bytes(&mut self, data: Bytes) -> Self::WriteBytesFuture<'_>
Write the entire bytes. Read more
§type SyncFuture<'a> = Flush<'a, T>
where
Self: 'a
type SyncFuture<'a> = Flush<'a, T> where Self: 'a
Future returned by sync
source§fn sync(&mut self) -> Self::SyncFuture<'_>
fn sync(&mut self) -> Self::SyncFuture<'_>
Sync any buffers to the underlying storage.
source§impl<T: Clone> Clone for TokioStreamWriter<T>
impl<T: Clone> Clone for TokioStreamWriter<T>
source§fn clone(&self) -> TokioStreamWriter<T>
fn clone(&self) -> TokioStreamWriter<T>
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 moreAuto Trait Implementations§
impl<T> RefUnwindSafe for TokioStreamWriter<T>where
T: RefUnwindSafe,
impl<T> Send for TokioStreamWriter<T>where
T: Send,
impl<T> Sync for TokioStreamWriter<T>where
T: Sync,
impl<T> Unpin for TokioStreamWriter<T>where
T: Unpin,
impl<T> UnwindSafe for TokioStreamWriter<T>where
T: 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