pub struct StreamWriterStats {
pub write: SizeAndStats,
pub write_bytes: SizeAndStats,
pub sync: Stats,
}Expand description
Statistics about a stream writer.
Fields§
§write: SizeAndStatsStatistics about the write operation.
write_bytes: SizeAndStatsStatistics about the write_bytes operation.
sync: StatsStatistics about the sync operation.
Implementations§
Source§impl StreamWriterStats
impl StreamWriterStats
Sourcepub fn total(&self) -> SizeAndStats
pub fn total(&self) -> SizeAndStats
Gives the total stats for this writer.
This adds the count and duration from all three operations, and the total number of bytes written from write and wite_bytes.
It is important to also add the sync stats, because some buffered writers will do most actual io in sync.
Trait Implementations§
Source§impl Add for StreamWriterStats
impl Add for StreamWriterStats
Source§type Output = StreamWriterStats
type Output = StreamWriterStats
The resulting type after applying the
+ operator.Source§impl AddAssign for StreamWriterStats
impl AddAssign for StreamWriterStats
Source§fn add_assign(&mut self, rhs: StreamWriterStats)
fn add_assign(&mut self, rhs: StreamWriterStats)
Performs the
+= operation. Read moreSource§impl Clone for StreamWriterStats
impl Clone for StreamWriterStats
Source§fn clone(&self) -> StreamWriterStats
fn clone(&self) -> StreamWriterStats
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 Debug for StreamWriterStats
impl Debug for StreamWriterStats
Source§impl Default for StreamWriterStats
impl Default for StreamWriterStats
Source§fn default() -> StreamWriterStats
fn default() -> StreamWriterStats
Returns the “default value” for a type. Read more
impl Copy for StreamWriterStats
Auto Trait Implementations§
impl Freeze for StreamWriterStats
impl RefUnwindSafe for StreamWriterStats
impl Send for StreamWriterStats
impl Sync for StreamWriterStats
impl Unpin for StreamWriterStats
impl UnwindSafe for StreamWriterStats
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