#[non_exhaustive]pub enum Error {
Build(BuildProblem),
Parse(ParseProblem),
Compression(CompressionProblem),
Decompression(DecompressionProblem),
Encoding(EncodingProblem),
Decoding(DecodingProblem),
ReadFailed(usize, Error, &'static Location<'static>),
SeekFailed(Error, &'static Location<'static>),
Io(Error),
}Expand description
A error varient that can be used to represent any error that can occur in 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.
Build(BuildProblem)
An error that can occur when building.
Parse(ParseProblem)
An error that can occur when parsing.
Compression(CompressionProblem)
An error that can occur when compressing.
Decompression(DecompressionProblem)
An error that can occur when decompressing.
Encoding(EncodingProblem)
An error that can occur when encoding.
Decoding(DecodingProblem)
An error that can occur when decoding.
ReadFailed(usize, Error, &'static Location<'static>)
Reading failed.
SeekFailed(Error, &'static Location<'static>)
Seeking failed.
Io(Error)
Unknown IO error.
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()
Source§impl From<BuildProblem> for Error
impl From<BuildProblem> for Error
Source§fn from(source: BuildProblem) -> Self
fn from(source: BuildProblem) -> Self
Converts to this type from the input type.
Source§impl From<CompressionProblem> for Error
impl From<CompressionProblem> for Error
Source§fn from(source: CompressionProblem) -> Self
fn from(source: CompressionProblem) -> Self
Converts to this type from the input type.
Source§impl From<DecodingProblem> for Error
impl From<DecodingProblem> for Error
Source§fn from(source: DecodingProblem) -> Self
fn from(source: DecodingProblem) -> Self
Converts to this type from the input type.
Source§impl From<DecompressionProblem> for Error
impl From<DecompressionProblem> for Error
Source§fn from(source: DecompressionProblem) -> Self
fn from(source: DecompressionProblem) -> Self
Converts to this type from the input type.
Source§impl From<EncodingProblem> for Error
impl From<EncodingProblem> for Error
Source§fn from(source: EncodingProblem) -> Self
fn from(source: EncodingProblem) -> Self
Converts to this type from the input type.
Source§impl From<ParseProblem> for Error
impl From<ParseProblem> for Error
Source§fn from(source: ParseProblem) -> Self
fn from(source: ParseProblem) -> Self
Converts to this type from the input type.
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