Struct ordered_varint::Signed[][src]

pub struct Signed(_);
Expand description

A signed integer value.

This type encodes values in the range -2.pow(123)..2.pow(123) by using the first 5 bits to denote a signed byte length. This length ranges from -15..=15. The number of bytes read is always absolute, but the sign of the length is used to determine the overall sign of the encoded value. The remaining 3 bits of the first byte and any additional bytes are then used to store the integer in big-endian encoding.

Trait Implementations

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Encodes self into destination, returning the number of bytes written upon success.

Decodes a variable length value from source.

Encodes self into a new Vec<u8>.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.