Enum calypso_error::CalError
source · #[non_exhaustive]
pub enum CalError {
Io(Error),
FromUtf8(FromUtf8Error),
Fmt(Error),
Other(Report),
}
Expand description
The Calypso error 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.
Io(Error)
IO errors
FromUtf8(FromUtf8Error)
UTF-8 decoding errors
Fmt(Error)
Formatting errors
Other(Report)
Any other error, using eyre
Implementations§
source§impl CalError
impl CalError
sourcepub fn try_downcast<E>(self) -> Result<E, Self>where
E: Display + Debug + Send + Sync + 'static,
pub fn try_downcast<E>(self) -> Result<E, Self>where
E: Display + Debug + Send + Sync + 'static,
Try to downcast the error into a concrete type, if the error is a
CalError::Other
.
Errors
self
is returned if the error could not be downcast.
sourcepub fn try_downcast_ref<E>(&self) -> Option<&E>where
E: Display + Debug + Send + Sync + 'static,
pub fn try_downcast_ref<E>(&self) -> Option<&E>where
E: Display + Debug + Send + Sync + 'static,
Try to downcast a reference to the error into a reference to a concrete
type, if the error is a CalError::Other
.
sourcepub fn try_downcast_mut<E>(&mut self) -> Option<&mut E>where
E: Display + Debug + Send + Sync + 'static,
pub fn try_downcast_mut<E>(&mut self) -> Option<&mut E>where
E: Display + Debug + Send + Sync + 'static,
Try to downcast a mutable reference to the error into a mutable
reference to a concrete type, if the error is a CalError::Other
.
Trait Implementations§
source§impl Error for CalError
impl Error for CalError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<FromUtf8Error> for CalError
impl From<FromUtf8Error> for CalError
source§fn from(source: FromUtf8Error) -> Self
fn from(source: FromUtf8Error) -> Self
Converts to this type from the input type.