Enum varu64::DecodeError[][src]

pub enum DecodeError {
    NonCanonical {
        encoded_number: u64,
    },
    UnexpectedEndOfInput,
    ExpectedANonZeroU64,
    EncodedNonZeroValueOverflowed,
}
Expand description

Everything that can go wrong when decoding a varu64.

Variants

NonCanonical

The encoding is not the shortest possible one for the number. Contains the encoded number.

Fields of NonCanonical

encoded_number: u64
UnexpectedEndOfInput

The slice contains less data than the encoding needs.

ExpectedANonZeroU64

Did not encode a non-zero u64

EncodedNonZeroValueOverflowed

Encoded a value that overflowed when converting from varu64 to non_zero value

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Returns a Backtrace that may be printed.

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

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method receivers. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

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.