pub struct NumeratorMetric(/* private fields */);
Expand description
Developer-facing API for recording rate metrics with external denominators.
Instances of this class type are automatically generated by the parsers at build time, allowing developers to record values that were previously registered in the metrics.yaml file.
Implementations§
Source§impl NumeratorMetric
impl NumeratorMetric
Sourcepub fn new(meta: CommonMetricData) -> Self
pub fn new(meta: CommonMetricData) -> Self
The public constructor used by automatically generated metrics.
Sourcepub fn add_to_numerator(&self, amount: i32)
pub fn add_to_numerator(&self, amount: i32)
Trait Implementations§
Source§impl Clone for NumeratorMetric
impl Clone for NumeratorMetric
Source§fn clone(&self) -> NumeratorMetric
fn clone(&self) -> NumeratorMetric
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<UT> LiftRef<UT> for NumeratorMetric
impl<UT> LiftRef<UT> for NumeratorMetric
type LiftType = Arc<NumeratorMetric>
Source§impl<UT> LowerError<UT> for NumeratorMetric
impl<UT> LowerError<UT> for NumeratorMetric
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Lower this value for scaffolding function return Read more
Source§impl<UT> LowerReturn<UT> for NumeratorMetric
impl<UT> LowerReturn<UT> for NumeratorMetric
Source§type ReturnType = <Arc<NumeratorMetric> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<NumeratorMetric> as LowerReturn<UniFfiTag>>::ReturnType
The type that should be returned by scaffolding functions for this type. Read more
Source§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
Lower the return value from an scaffolding call Read more
Source§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Lower the return value for failed argument lifts Read more
Source§impl MallocSizeOf for NumeratorMetric
impl MallocSizeOf for NumeratorMetric
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Source§impl MetricType for NumeratorMetric
impl MetricType for NumeratorMetric
Source§fn with_name(&self, _name: String) -> Selfwhere
Self: Sized,
fn with_name(&self, _name: String) -> Selfwhere
Self: Sized,
Create a new metric from this with a new name.
Source§fn with_dynamic_label(&self, _label: DynamicLabelType) -> Selfwhere
Self: Sized,
fn with_dynamic_label(&self, _label: DynamicLabelType) -> Selfwhere
Self: Sized,
Create a new metric from this with a specific label.
Source§impl TestGetValue<Rate> for NumeratorMetric
impl TestGetValue<Rate> for NumeratorMetric
Source§impl<UT> TypeId<UT> for NumeratorMetric
impl<UT> TypeId<UT> for NumeratorMetric
Auto Trait Implementations§
impl Freeze for NumeratorMetric
impl RefUnwindSafe for NumeratorMetric
impl Send for NumeratorMetric
impl Sync for NumeratorMetric
impl Unpin for NumeratorMetric
impl UnwindSafe for NumeratorMetric
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