Struct gtmpl_value::Number [−][src]
pub struct Number { /* fields omitted */ }
Expand description
Internal number format for gtmpl_value
.
Implementations
use std::i64; use gtmpl_value::Number; let big: Number = (i64::MAX as u64 + 10).into(); assert!(big.as_u64().is_some()); assert!(big.as_i64().is_none()); assert!(big.as_f64().is_none());
use std::i64; use gtmpl_value::Number; let neg: Number = (-10).into(); assert!(neg.as_u64().is_none()); assert!(neg.as_i64().is_some()); assert!(neg.as_f64().is_none());
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Number
impl UnwindSafe for Number
Blanket Implementations
Mutably borrows from an owned value. Read more