Enum cbor::CborSigned [] [src]

pub enum CborSigned {
    Int8(i8),
    Int16(i16),
    Int32(i32),
    Int64(i64),
}

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

Negative 8 bit integer.

Negative 16 bit integer.

Negative 32 bit integer.

Negative 64 bit integer.

Methods

impl CborSigned
[src]

Return the underlying value as a i64.

Trait Implementations

impl Clone for CborSigned
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for CborSigned
[src]

impl Debug for CborSigned
[src]

Formats the value using the given formatter.

impl Eq for CborSigned
[src]

impl Ord for CborSigned
[src]

This method returns an Ordering between self and other. Read more

impl PartialEq for CborSigned
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl PartialOrd for CborSigned
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

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]

Deserialize a value using a Decoder.

impl Encodable for CborSigned
[src]

Serialize a value using an Encoder.