Enum sli::Error [−][src]
#[non_exhaustive] pub enum Error { BadMagic { pos: usize, found: Box<dyn Any + 'static, Global>, }, AssertFail { pos: usize, message: String, }, Io(Error), Custom { pos: usize, err: Box<dyn Any + 'static, Global>, }, NoVariantMatch { pos: usize, }, EnumErrors { pos: usize, variant_errors: Vec<(&'static str, Error), Global>, }, }
Expand description
An error while parsing a BinRead type
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.
The magic value did not match the provided one
The condition of an assertion without a custom type failed
Io(Error)
An error that occured while reading from, or seeking within, the reader
A custom error, most often given from the second value passed into an assert
No variant in the enum was successful in parsing the data
Show fields
Fields of NoVariantMatch
pos: usize
Implementations
Gets a custom error of type T from the Error. Returns None
if the error type is not
custom or if the contained error is not of the desired type.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error