pub enum HistogramValue {
Bool(bool),
Int(i64),
Float(f32),
String(Box<String>),
}Expand description
A structure of histogram value.
Variants§
Bool(bool)
A boolean value.
Int(i64)
An integer number.
Float(f32)
A floating-point number.
String(Box<String>)
A string.
Implementations§
Source§impl HistogramValue
impl HistogramValue
Sourcepub fn to_opt_bool(&self) -> Option<bool>
pub fn to_opt_bool(&self) -> Option<bool>
Converts the value to a boolean value if the value is an boolean type, otherwise this
method returns None.
Sourcepub fn to_opt_i64(&self) -> Option<i64>
pub fn to_opt_i64(&self) -> Option<i64>
Converts the value to an integer number if the value is an integer type or floating-point
type, otherwise this method returns None.
Sourcepub fn to_opt_f32(&self) -> Option<f32>
pub fn to_opt_f32(&self) -> Option<f32>
Converts the value to a floating-point number if the value is an integer type or
floating-point type, otherwise this method returns None.
Sourcepub fn to_opt_string(&self) -> Option<String>
pub fn to_opt_string(&self) -> Option<String>
Converts the value to a string if the value is a string type, otherwise this method
returns None.
Trait Implementations§
Source§impl Clone for HistogramValue
impl Clone for HistogramValue
Source§fn clone(&self) -> HistogramValue
fn clone(&self) -> HistogramValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HistogramValue
impl Debug for HistogramValue
Source§impl Display for HistogramValue
impl Display for HistogramValue
Source§impl PartialEq for HistogramValue
impl PartialEq for HistogramValue
Auto Trait Implementations§
impl Freeze for HistogramValue
impl RefUnwindSafe for HistogramValue
impl Send for HistogramValue
impl Sync for HistogramValue
impl Unpin for HistogramValue
impl UnsafeUnpin for HistogramValue
impl UnwindSafe for HistogramValue
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.