Enum bitbuffer::BitError [−][src]
pub enum BitError { TooManyBits { requested: usize, max: usize, }, NotEnoughData { requested: usize, bits_left: usize, }, IndexOutOfBounds { pos: usize, size: usize, }, UnmatchedDiscriminant { discriminant: usize, enum_name: String, }, Utf8Error(Utf8Error, usize), StringToLong { string_length: usize, requested_length: usize, }, }
Expand description
Errors that can be returned when trying to read from or write to a buffer
Variants
Too many bits requested to fit in the requested data type
Fields of TooManyBits
Not enough data in the buffer to read all requested bits
Fields of NotEnoughData
The requested position is outside the bounds of the stream or buffer
Fields of IndexOutOfBounds
Unmatched discriminant found while trying to read an enum
Fields of UnmatchedDiscriminant
The read slice of bytes are not valid utf8
The string that was requested to be written does not fit in the specified fixed length
Fields of StringToLong
Trait Implementations
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
👎 Deprecated since 1.33.0:
replaced by Error::source, which can support downcasting
The lower-level source of this error, if any. Read more
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for BitError
impl UnwindSafe for BitError