pub struct DfirMetricsIntervals { /* private fields */ }Expand description
A handle into a DFIR instance’s metrics, where each call to Self::take_interval ends the current interval and
returns its metrics. Obtained via Dfir::metrics_intervals.
The first call to take_interval returns metrics since this DFIR instance was created. Each subsequent call to
take_interval returns metrics since the previous call.
Cloning the handle “forks” it from the original, as afterwards each interval may return different metrics
depending on when exactly take_interval is called.
Implementations§
Source§impl DfirMetricsIntervals
impl DfirMetricsIntervals
Sourcepub fn take_interval(&mut self) -> DfirMetrics
pub fn take_interval(&mut self) -> DfirMetrics
Ends the current interval and returns the accumulated metrics across the interval.
The first call to take_interval returns metrics since this DFIR instance was created. Each subsequent call to
take_interval returns metrics since the previous call.
Sourcepub fn all_metrics(&self) -> Rc<DfirMetrics>
pub fn all_metrics(&self) -> Rc<DfirMetrics>
Returns a reference-counted handle to the original continually-updated runtime metrics for this DFIR instance.
See Dfir::metrics.
Trait Implementations§
Source§impl Clone for DfirMetricsIntervals
impl Clone for DfirMetricsIntervals
Source§fn clone(&self) -> DfirMetricsIntervals
fn clone(&self) -> DfirMetricsIntervals
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for DfirMetricsIntervals
impl !RefUnwindSafe for DfirMetricsIntervals
impl !Send for DfirMetricsIntervals
impl !Sync for DfirMetricsIntervals
impl Unpin for DfirMetricsIntervals
impl !UnwindSafe for DfirMetricsIntervals
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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> ToSinkBuild for T
impl<T> ToSinkBuild for T
§fn iter_to_sink_build(self) -> SendIterBuild<Self>
fn iter_to_sink_build(self) -> SendIterBuild<Self>
§fn stream_to_sink_build(self) -> SendStreamBuild<Self>where
Self: Sized + Stream,
fn stream_to_sink_build(self) -> SendStreamBuild<Self>where
Self: Sized + Stream,
SinkBuild] adaptor chain to send all items from self as a [Stream].