#[non_exhaustive]pub enum Error {
Io(Error),
InvalidVInt,
OutOfBounds,
OverDecode(VInt64),
ShortRead,
UnderDecode(VInt64),
MissingElement(VInt64),
DuplicateElement {
id: VInt64,
parent: VInt64,
},
ElementBodySizeUnknown(VInt64),
MalformedLacingData,
}Expand description
Error types for this crate.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Io(Error)
I/O error, from std::io::Error.
InvalidVInt
Invalid variable-length integer encoding, incidicates a vint longer than 8 bytes.
OutOfBounds
Attempted to read past the end of the buffer.
OverDecode(VInt64)
Attempted to read past the end of the buffer during element body decoding.
ShortRead
Not all bytes were consumed in a element body
UnderDecode(VInt64)
Not all bytes were consumed in a element body during element body decoding.
MissingElement(VInt64)
Missing element.
DuplicateElement
Duplicate element in a master element.
ElementBodySizeUnknown(VInt64)
Element body size is unknown.
MalformedLacingData
Malformed lacing data.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more