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
Source§impl Inspect for &mut DataStreamInspect
impl Inspect for &mut DataStreamInspect
Source§fn iattach(
self,
parent: &InspectNode,
name: impl AsRef<str>,
) -> Result<(), AttachError>
fn iattach( self, parent: &InspectNode, name: impl AsRef<str>, ) -> Result<(), AttachError>
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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> WithInspect for T
impl<T> WithInspect for T
Source§fn with_inspect(
self,
parent: &Node,
name: impl AsRef<str>,
) -> Result<T, AttachError>
fn with_inspect( self, parent: &Node, name: impl AsRef<str>, ) -> Result<T, AttachError>
Attaches self to the inspect tree. It is recommended to invoke this as
part of construction. For example: Read more