pub enum CborSigned {
Int8(i8),
Int16(i16),
Int32(i32),
Int64(i64),
}Expand description
A negative integer (major type 1).
Note that while the number -255 can be encoded using two bytes as a
CBOR uint8, it is outside the range of numbers allowed in i8.
Therefore, when CBOR data is decoded, -225 is stored as in i16 in
memory.
Variants§
Int8(i8)
Negative 8 bit integer.
Int16(i16)
Negative 16 bit integer.
Int32(i32)
Negative 32 bit integer.
Int64(i64)
Negative 64 bit integer.
Implementations§
Trait Implementations§
Source§impl Clone for CborSigned
impl Clone for CborSigned
Source§fn clone(&self) -> CborSigned
fn clone(&self) -> CborSigned
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CborSigned
impl Debug for CborSigned
Source§impl Decodable for CborSigned
impl Decodable for CborSigned
Source§impl Encodable for CborSigned
impl Encodable for CborSigned
Source§impl Ord for CborSigned
impl Ord for CborSigned
Source§fn cmp(&self, other: &CborSigned) -> Ordering
fn cmp(&self, other: &CborSigned) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CborSigned
impl PartialEq for CborSigned
Source§impl PartialOrd for CborSigned
impl PartialOrd for CborSigned
impl Copy for CborSigned
impl Eq for CborSigned
impl StructuralPartialEq for CborSigned
Auto Trait Implementations§
impl Freeze for CborSigned
impl RefUnwindSafe for CborSigned
impl Send for CborSigned
impl Sync for CborSigned
impl Unpin for CborSigned
impl UnwindSafe for CborSigned
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)