Enum cbor::CborSigned [−][src]
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.
Methods
impl CborSigned
[src]
impl CborSigned
Trait Implementations
impl Clone for CborSigned
[src]
impl Clone for CborSigned
fn clone(&self) -> CborSigned
[src]
fn clone(&self) -> CborSigned
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for CborSigned
[src]
impl Copy for CborSigned
impl Debug for CborSigned
[src]
impl Debug for CborSigned
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for CborSigned
[src]
impl Eq for CborSigned
impl Ord for CborSigned
[src]
impl Ord for CborSigned
fn cmp(&self, other: &CborSigned) -> Ordering
[src]
fn cmp(&self, other: &CborSigned) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl PartialEq for CborSigned
[src]
impl PartialEq for CborSigned
fn eq(&self, other: &CborSigned) -> bool
[src]
fn eq(&self, other: &CborSigned) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &CborSigned) -> bool
[src]
fn ne(&self, other: &CborSigned) -> bool
This method tests for !=
.
impl PartialOrd for CborSigned
[src]
impl PartialOrd for CborSigned
fn partial_cmp(&self, other: &CborSigned) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &CborSigned) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &CborSigned) -> bool
[src]
fn lt(&self, other: &CborSigned) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &CborSigned) -> bool
[src]
fn le(&self, other: &CborSigned) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &CborSigned) -> bool
[src]
fn gt(&self, other: &CborSigned) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &CborSigned) -> bool
[src]
fn ge(&self, other: &CborSigned) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Decodable for CborSigned
[src]
impl Decodable for CborSigned
fn decode<__D: Decoder>(d: &mut __D) -> Result<CborSigned, __D::Error>
[src]
fn decode<__D: Decoder>(d: &mut __D) -> Result<CborSigned, __D::Error>
Deserialize a value using a Decoder
.
impl Encodable for CborSigned
[src]
impl Encodable for CborSigned
Auto Trait Implementations
impl Send for CborSigned
impl Send for CborSigned
impl Sync for CborSigned
impl Sync for CborSigned