pub enum ErrorKind {
Read {
what: String,
},
Decode {
what: String,
},
Seek,
UnknownFileHeaderSize(u8),
UnsupportedProtocolVersion {
upper_bound: u8,
got: u8,
},
UnknownBaseType {
type_id: u8,
},
UnknownType {
type_name: String,
type_id: usize,
},
NotFit,
UnknownArchitecture(u8),
UnknownMessage(u16),
UnknownField(u8),
MissingDefinition(u8),
}
Expand description
The specific kind of error that can occur.
Variants
Read
Fields
what: String
An error occured while attempting to read bytes.
Decode
Fields
what: String
An error occured while attempting to decode data.
Seek
An error occured while seeking.
UnknownFileHeaderSize(u8)
Encountered a bad file header size.
UnsupportedProtocolVersion
Encountered an unsupported protocol version.
UnknownBaseType
Fields
type_id: u8
Encountered an unknown base type identifier.
UnknownType
Encountered an unknown type identifier.
NotFit
Bad file magic.
UnknownArchitecture(u8)
Encountered an unknown file architecture.
UnknownMessage(u16)
Encountered an unknown message number.
UnknownField(u8)
Encountered an unknown field definition number.
MissingDefinition(u8)
A data message referenced an unknown definition message.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnwindSafe for ErrorKind
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more