Struct iroh_io::stats::TrackingStreamWriter
source · pub struct TrackingStreamWriter<W> { /* private fields */ }Expand description
A stream writer that tracks the time spent in write operations.
Implementations§
source§impl<W> TrackingStreamWriter<W>
impl<W> TrackingStreamWriter<W>
sourcepub fn stats(&self) -> StreamWriterStats
pub fn stats(&self) -> StreamWriterStats
Get the statistics about the write operations.
Trait Implementations§
source§impl<W: AsyncStreamWriter> AsyncStreamWriter for TrackingStreamWriter<W>
impl<W: AsyncStreamWriter> AsyncStreamWriter for TrackingStreamWriter<W>
§type WriteFuture<'a> = AggregateStats<'a, <W as AsyncStreamWriter>::WriteFuture<'a>>
where
Self: 'a
type WriteFuture<'a> = AggregateStats<'a, <W as AsyncStreamWriter>::WriteFuture<'a>> 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> = AggregateStats<'a, <W as AsyncStreamWriter>::WriteBytesFuture<'a>>
where
Self: 'a
type WriteBytesFuture<'a> = AggregateStats<'a, <W as AsyncStreamWriter>::WriteBytesFuture<'a>> 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> = AggregateStats<'a, <W as AsyncStreamWriter>::SyncFuture<'a>>
where
Self: 'a
type SyncFuture<'a> = AggregateStats<'a, <W as AsyncStreamWriter>::SyncFuture<'a>> 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<W: Clone> Clone for TrackingStreamWriter<W>
impl<W: Clone> Clone for TrackingStreamWriter<W>
source§fn clone(&self) -> TrackingStreamWriter<W>
fn clone(&self) -> TrackingStreamWriter<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 moreAuto Trait Implementations§
impl<W> RefUnwindSafe for TrackingStreamWriter<W>where
W: RefUnwindSafe,
impl<W> Send for TrackingStreamWriter<W>where
W: Send,
impl<W> Sync for TrackingStreamWriter<W>where
W: Sync,
impl<W> Unpin for TrackingStreamWriter<W>where
W: Unpin,
impl<W> UnwindSafe for TrackingStreamWriter<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