pub enum Int {
Neg(u64),
Pos(u64),
}
Expand description
Type to represent all possible CBOR integer values.
Since the encoding of negative integers (major type 1) follows
unsigned integers (major type 0), mapping negative integers
to i8
, i16
, i32
or i64
can result in integer overflows.
If all possible values should be handled, this type can be used.
Variants§
Implementations§
Trait Implementations§
Source§impl Ord for Int
impl Ord for Int
Source§impl PartialOrd for Int
impl PartialOrd for Int
impl Copy for Int
impl Eq for Int
impl StructuralPartialEq for Int
Auto Trait Implementations§
impl Freeze for Int
impl RefUnwindSafe for Int
impl Send for Int
impl Sync for Int
impl Unpin for Int
impl UnwindSafe for Int
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