pub struct Stats { /* private fields */ }Expand description
Hot-path counters. Cheap to read, cheap to bump, safe to share.
Implementations§
Source§impl Stats
impl Stats
pub fn add_downloaded(&self, n: u64)
pub fn set_downloaded(&self, n: u64)
pub fn downloaded(&self) -> u64
pub fn set_durable(&self, n: u64)
pub fn durable(&self) -> u64
pub fn connection_opened(&self)
pub fn connection_closed(&self)
pub fn active_connections(&self) -> usize
pub fn set_ranges_total(&self, n: usize)
pub fn set_ranges_complete(&self, n: usize)
pub fn ranges(&self) -> (usize, usize)
pub fn record_retry(&self)
pub fn retries(&self) -> u64
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Stats
impl RefUnwindSafe for Stats
impl Send for Stats
impl Sync for Stats
impl Unpin for Stats
impl UnsafeUnpin for Stats
impl UnwindSafe for Stats
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