Struct opentelemetry::metrics::Number [−][src]
metrics
only.Number represents either an integral or a floating point value. It needs to be accompanied with a source of NumberKind that describes the actual type of the value stored within Number.
Implementations
impl Number
[src]
pub fn to_atomic(&self) -> AtomicNumber
[src]
Create an atomic version of the current number
pub fn partial_cmp(
&self,
number_kind: &NumberKind,
other: &Number
) -> Option<Ordering>
[src]
&self,
number_kind: &NumberKind,
other: &Number
) -> Option<Ordering>
Compares this number to the given other number. Both should be of the same kind.
pub fn to_i64(&self, number_kind: &NumberKind) -> i64
[src]
Casts the number to i64
. May result in data/precision loss.
pub fn to_f64(&self, number_kind: &NumberKind) -> f64
[src]
Casts the number to f64
. May result in data/precision loss.
pub fn to_u64(&self, number_kind: &NumberKind) -> u64
[src]
Casts the number to u64
. May result in data/precision loss.
pub fn is_nan(&self) -> bool
[src]
Checks if this value ia an f64 nan value. Do not use on non-f64 values.
pub fn is_negative(&self, number_kind: &NumberKind) -> bool
[src]
true
if the actual value is less than zero.
pub fn to_debug(&self, kind: &NumberKind) -> Box<dyn Debug>
[src]
Return loaded data for debugging purposes
Trait Implementations
impl Clone for Number
[src]
impl Debug for Number
[src]
impl Default for Number
[src]
impl From<f64> for Number
[src]
impl From<i64> for Number
[src]
impl From<u64> for Number
[src]
Auto Trait Implementations
impl RefUnwindSafe for Number
impl Send for Number
impl Sync for Number
impl Unpin for Number
impl UnwindSafe for Number
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,