Struct Metric
pub struct Metric { /* private fields */ }Available on crate features
metrics and opentelemetry only.Expand description
A collection of one or more aggregated time series from an Instrument.
Implementations§
§impl Metric
impl Metric
pub fn description(&self) -> &str
pub fn description(&self) -> &str
Returns the description of the instrument.
pub fn data(&self) -> &AggregatedMetrics
pub fn data(&self) -> &AggregatedMetrics
Returns the aggregated data from the instrument.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Metric
impl Freeze for Metricwhere
&'static str: Freeze,
String: Freeze,
*const u8 is !null: Freeze,
PhantomData<GaugeDataPoint<f64>>: Freeze,
PhantomData<SumDataPoint<f64>>: Freeze,
PhantomData<HistogramDataPoint<f64>>: Freeze,
PhantomData<ExponentialHistogramDataPoint<f64>>: Freeze,
PhantomData<GaugeDataPoint<u64>>: Freeze,
PhantomData<SumDataPoint<u64>>: Freeze,
PhantomData<HistogramDataPoint<u64>>: Freeze,
PhantomData<ExponentialHistogramDataPoint<u64>>: Freeze,
PhantomData<GaugeDataPoint<i64>>: Freeze,
PhantomData<SumDataPoint<i64>>: Freeze,
PhantomData<HistogramDataPoint<i64>>: Freeze,
PhantomData<ExponentialHistogramDataPoint<i64>>: Freeze,
impl Move for Metric
impl RefUnwindSafe for Metric
impl Send for Metric
impl Sync for Metric
impl Unpin for Metric
impl UnsafeUnpin for Metricwhere
&'static str: UnsafeUnpin,
String: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<GaugeDataPoint<f64>>: UnsafeUnpin,
PhantomData<SumDataPoint<f64>>: UnsafeUnpin,
PhantomData<HistogramDataPoint<f64>>: UnsafeUnpin,
PhantomData<ExponentialHistogramDataPoint<f64>>: UnsafeUnpin,
PhantomData<GaugeDataPoint<u64>>: UnsafeUnpin,
PhantomData<SumDataPoint<u64>>: UnsafeUnpin,
PhantomData<HistogramDataPoint<u64>>: UnsafeUnpin,
PhantomData<ExponentialHistogramDataPoint<u64>>: UnsafeUnpin,
PhantomData<GaugeDataPoint<i64>>: UnsafeUnpin,
PhantomData<SumDataPoint<i64>>: UnsafeUnpin,
PhantomData<HistogramDataPoint<i64>>: UnsafeUnpin,
PhantomData<ExponentialHistogramDataPoint<i64>>: UnsafeUnpin,
impl UnwindSafe for Metricwhere
&'static str: UnwindSafe,
String: UnwindSafe,
RawVecInner: UnwindSafe,
BoxRaw<str>: UnwindSafe,
Arc<str>: UnwindSafe,
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§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> ⓘ
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Create a new
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more