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§
Trait Implementations§
source§impl<'a> PartialEq for Number<'a>
impl<'a> PartialEq for Number<'a>
impl<'a> StructuralPartialEq for Number<'a>
Auto Trait Implementations§
impl<'a> Freeze for Number<'a>
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§
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