Enum cbor_data::Number [−][src]
pub enum Number<'a> {
Int(i128),
IEEE754(f64),
Decimal {
exponent: i128,
mantissa: Cow<'a, [u8]>,
inverted: bool,
},
Float {
exponent: i128,
mantissa: Cow<'a, [u8]>,
inverted: bool,
},
}Expand description
Representation of a number extracted from a CBOR item
Variants
Int(i128)
Tuple Fields
0: i128an integer number from major types 0 or 1
IEEE754(f64)
Tuple Fields
0: f64a floating-point number from major type 7
Decimal
a big integer or big decimal with value mantissa * 10.pow(exponent)
Float
a big integer or big decimal with value mantissa * 2.pow(exponent)
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Number<'a>
impl<'a> UnwindSafe for Number<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more