Struct bitcoin::network::encodable::VarInt[][src]

pub struct VarInt(pub u64);

A variable-length unsigned integer

Methods

impl VarInt
[src]

Gets the length of this VarInt when encoded. Returns 1 for 0...0xFC, 3 for 0xFD...(2^16-1), 5 for 0x10000...(2^32-1), and 9 otherwise.

Trait Implementations

impl PartialEq for VarInt
[src]

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

This method tests for !=.

impl Eq for VarInt
[src]

impl PartialOrd for VarInt
[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 Ord for VarInt
[src]

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

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl Clone for VarInt
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for VarInt
[src]

Formats the value using the given formatter. Read more

impl<S: SimpleEncoder> ConsensusEncodable<S> for VarInt
[src]

Encode an object with a well-defined format

impl<D: SimpleDecoder> ConsensusDecodable<D> for VarInt
[src]

Decode an object with a well-defined format

Auto Trait Implementations

impl Send for VarInt

impl Sync for VarInt