Enum bitreader::BitReaderError [] [src]

pub enum BitReaderError {
    NotEnoughData {
        position: u64,
        length: u64,
        requested: u64,
    },
    TooManyBitsForType {
        position: u64,
        requested: u8,
        allowed: u8,
    },
}

Error enumeration of BitReader errors.

Variants

NotEnoughData

Requested more bits than there are left in the byte slice at the current position.

Fields

position: u64
length: u64
requested: u64
TooManyBitsForType

Requested more bits than the returned variable can hold, for example more than 8 bits when reading into a u8.

Fields

position: u64
requested: u8
allowed: u8

Trait Implementations

impl Clone for BitReaderError
[src]

fn clone(&self) -> BitReaderError

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Copy for BitReaderError
[src]

impl PartialEq for BitReaderError
[src]

fn eq(&self, __arg_0: &BitReaderError) -> bool

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

fn ne(&self, __arg_0: &BitReaderError) -> bool

This method tests for !=.

impl Debug for BitReaderError
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Error for BitReaderError
[src]

fn description(&self) -> &str

A short description of the error. Read more

fn cause(&self) -> Option<&Error>
1.0.0

The lower-level cause of this error, if any. Read more

impl Display for BitReaderError
[src]

fn fmt(&self, fmt: &mut Formatter) -> Result

Formats the value using the given formatter.