Struct opentelemetry::metrics::ObservableGauge
source · pub struct ObservableGauge<T>(/* private fields */);
Expand description
An async instrument that records independent readings.
Implementations§
source§impl<T> ObservableGauge<T>
impl<T> ObservableGauge<T>
source§impl<T> ObservableGauge<T>
impl<T> ObservableGauge<T>
sourcepub fn new(inner: Arc<dyn AsyncInstrument<T>>) -> Self
pub fn new(inner: Arc<dyn AsyncInstrument<T>>) -> Self
Create a new gauge
Trait Implementations§
source§impl<M> AsyncInstrument<M> for ObservableGauge<M>
impl<M> AsyncInstrument<M> for ObservableGauge<M>
source§impl<T: Clone> Clone for ObservableGauge<T>
impl<T: Clone> Clone for ObservableGauge<T>
source§fn clone(&self) -> ObservableGauge<T>
fn clone(&self) -> ObservableGauge<T>
Returns a copy 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<T> Debug for ObservableGauge<T>where
T: Debug,
impl<T> Debug for ObservableGauge<T>where
T: Debug,
source§impl TryFrom<AsyncInstrumentBuilder<'_, ObservableGauge<f64>, f64>> for ObservableGauge<f64>
impl TryFrom<AsyncInstrumentBuilder<'_, ObservableGauge<f64>, f64>> for ObservableGauge<f64>
source§type Error = MetricsError
type Error = MetricsError
The type returned in the event of a conversion error.
source§fn try_from(
builder: AsyncInstrumentBuilder<'_, ObservableGauge<f64>, f64>,
) -> Result<Self, Self::Error>
fn try_from( builder: AsyncInstrumentBuilder<'_, ObservableGauge<f64>, f64>, ) -> Result<Self, Self::Error>
Performs the conversion.
source§impl TryFrom<AsyncInstrumentBuilder<'_, ObservableGauge<i64>, i64>> for ObservableGauge<i64>
impl TryFrom<AsyncInstrumentBuilder<'_, ObservableGauge<i64>, i64>> for ObservableGauge<i64>
source§type Error = MetricsError
type Error = MetricsError
The type returned in the event of a conversion error.
source§fn try_from(
builder: AsyncInstrumentBuilder<'_, ObservableGauge<i64>, i64>,
) -> Result<Self, Self::Error>
fn try_from( builder: AsyncInstrumentBuilder<'_, ObservableGauge<i64>, i64>, ) -> Result<Self, Self::Error>
Performs the conversion.
source§impl TryFrom<AsyncInstrumentBuilder<'_, ObservableGauge<u64>, u64>> for ObservableGauge<u64>
impl TryFrom<AsyncInstrumentBuilder<'_, ObservableGauge<u64>, u64>> for ObservableGauge<u64>
source§type Error = MetricsError
type Error = MetricsError
The type returned in the event of a conversion error.
source§fn try_from(
builder: AsyncInstrumentBuilder<'_, ObservableGauge<u64>, u64>,
) -> Result<Self, Self::Error>
fn try_from( builder: AsyncInstrumentBuilder<'_, ObservableGauge<u64>, u64>, ) -> Result<Self, Self::Error>
Performs the conversion.
Auto Trait Implementations§
impl<T> Freeze for ObservableGauge<T>
impl<T> !RefUnwindSafe for ObservableGauge<T>
impl<T> Send for ObservableGauge<T>
impl<T> Sync for ObservableGauge<T>
impl<T> Unpin for ObservableGauge<T>
impl<T> !UnwindSafe for ObservableGauge<T>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)