pub struct Metrics { /* private fields */ }Expand description
Shared, cloneable metrics handle.
Implementations§
Source§impl Metrics
impl Metrics
pub fn new() -> Self
pub fn set_totals(&self, files: u64, bytes: u64)
pub fn chunk_done(&self, logical: u64, wire: u64, compressed: bool)
Sourcepub fn chunk_zero(&self, logical: u64, wire: u64)
pub fn chunk_zero(&self, logical: u64, wire: u64)
A hole: counted as progress and as a chunk, but the payload never existed on the wire.
Sourcepub fn compressor_ran(&self)
pub fn compressor_ran(&self)
Record that the compressor ran on a chunk, regardless of the outcome.
Sourcepub fn chunk_reused(&self, logical: u64, wire: u64)
pub fn chunk_reused(&self, logical: u64, wire: u64)
A chunk the far side already held: counted as progress, but the payload never crossed the wire.
pub fn chunk_skipped(&self, logical: u64)
pub fn file_done(&self)
pub fn elapsed(&self) -> Duration
pub fn snapshot(&self) -> Progress
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Metrics
impl RefUnwindSafe for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnsafeUnpin for Metrics
impl UnwindSafe for Metrics
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more