pub enum Error {
Msg(String),
Localized(String, usize, Box<Error>),
MissingRule(String),
MaximumRecursion(usize),
Io(Error),
Parse(Box<Error<Rule>>),
Format(Error),
Regex(Error),
Serialize(EncodeError),
Deserialize(DecodeError),
}Expand description
Represents all possible errors that can occur during file type detection and processing.
Variants§
Msg(String)
A generic error with a custom message.
Localized(String, usize, Box<Error>)
An error with a source location and a nested error.
MissingRule(String)
Indicates a required rule was not found.
MaximumRecursion(usize)
Indicates the maximum recursion depth was reached.
Io(Error)
Wraps an I/O error.
Parse(Box<Error<Rule>>)
Wraps a parsing error from the pest parser.
Format(Error)
Wraps a formatting error from the dyf crate.
Regex(Error)
Wraps a regex-related error.
Serialize(EncodeError)
Wraps a serialization error from bincode.
Deserialize(DecodeError)
Wraps a deserialization error from bincode.
Implementations§
Source§impl Error
impl Error
Sourcepub fn unwrap_localized(&self) -> &Self
pub fn unwrap_localized(&self) -> &Self
Unwraps the localized 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<DecodeError> for Error
impl From<DecodeError> for Error
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<EncodeError> for Error
impl From<EncodeError> for Error
Source§fn from(source: EncodeError) -> Self
fn from(source: EncodeError) -> 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