pub struct EtpaoTracker { /* private fields */ }Expand description
Tracks ETPAO metrics per scope, updated from context receipt outcomes.
Implementations§
Source§impl EtpaoTracker
impl EtpaoTracker
Sourcepub fn record_receipt(
&mut self,
scope: &str,
receipt: &ContextReceiptV1,
outcome: ReceiptOutcome,
)
pub fn record_receipt( &mut self, scope: &str, receipt: &ContextReceiptV1, outcome: ReceiptOutcome, )
Records one delivered receipt and its evaluated outcome for a scope.
Sourcepub fn get(&self, scope: &str) -> Option<&EtpaoMetrics>
pub fn get(&self, scope: &str) -> Option<&EtpaoMetrics>
Returns metrics for a tracked scope.
Sourcepub fn aggregate(&self) -> EtpaoMetrics
pub fn aggregate(&self) -> EtpaoMetrics
Combines every tracked scope into a single aggregate.
Sourcepub fn all_scopes(&self) -> Vec<&str>
pub fn all_scopes(&self) -> Vec<&str>
Lists tracked scope names in stable lexical order.
Sourcepub fn to_wire(&self) -> Vec<EtpaoMetrics>
pub fn to_wire(&self) -> Vec<EtpaoMetrics>
Returns serializable scope metrics in stable lexical order.
Trait Implementations§
Source§impl Debug for EtpaoTracker
impl Debug for EtpaoTracker
Source§impl Default for EtpaoTracker
impl Default for EtpaoTracker
Source§fn default() -> EtpaoTracker
fn default() -> EtpaoTracker
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EtpaoTracker
impl RefUnwindSafe for EtpaoTracker
impl Send for EtpaoTracker
impl Sync for EtpaoTracker
impl Unpin for EtpaoTracker
impl UnsafeUnpin for EtpaoTracker
impl UnwindSafe for EtpaoTracker
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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