pub enum Number<'a> {
Int(i128),
IEEE754(f64),
Decimal(Exponential<'a, Ten>),
Float(Exponential<'a, Two>),
}Expand description
Representation of a number extracted from a CBOR item
Variants
Int(i128)
an integer number from major types 0 or 1
IEEE754(f64)
a floating-point number from major type 7
Decimal(Exponential<'a, Ten>)
a big integer or big decimal with value mantissa * 10.pow(exponent)
Float(Exponential<'a, Two>)
a big integer or big decimal with value mantissa * 2.pow(exponent)
Implementations
sourceimpl<'a> Number<'a>
impl<'a> Number<'a>
sourcepub fn make_static(self) -> Number<'static>
pub fn make_static(self) -> Number<'static>
Cut ties with possibly referenced byte slices, allocating if necessary
Trait Implementations
impl<'a> StructuralPartialEq for Number<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for Number<'a>
impl<'a> Send for Number<'a>
impl<'a> Sync for Number<'a>
impl<'a> Unpin for Number<'a>
impl<'a> UnwindSafe for Number<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more