pub struct DataStreamInspect { /* private fields */ }
Expand description
An inspect node that represents a stream of data, recording the total amount of data transferred and an instantaneous rate.
Implementations§
Source§impl DataStreamInspect
impl DataStreamInspect
pub fn start(&mut self)
Sourcepub fn record_transferred(&mut self, bytes: usize, at: MonotonicInstant)
pub fn record_transferred(&mut self, bytes: usize, at: MonotonicInstant)
Record that bytes
have been transferred as of at
.
This is recorded since the last_update
time or since start
if it
has never been called.
Does nothing if this stream has never been started or if the provided at
time
is in the past relative to the last_update
time.
Trait Implementations§
Source§impl Default for DataStreamInspect
impl Default for DataStreamInspect
Source§fn default() -> DataStreamInspect
fn default() -> DataStreamInspect
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DataStreamInspect
impl !RefUnwindSafe for DataStreamInspect
impl Send for DataStreamInspect
impl Sync for DataStreamInspect
impl Unpin for DataStreamInspect
impl !UnwindSafe for DataStreamInspect
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