Struct rustic_core::RusticError
source · pub struct RusticError(RusticErrorKind);Expand description
Errors that can result from rustic.
Tuple Fields§
§0: RusticErrorKindImplementations§
source§impl RusticError
impl RusticError
sourcepub fn into_inner(self) -> RusticErrorKind
pub fn into_inner(self) -> RusticErrorKind
Expose the inner error kind.
This is useful for matching on the error kind.
sourcepub fn is_incorrect_password(&self) -> bool
pub fn is_incorrect_password(&self) -> bool
Checks if the error is due to an incorrect password
sourcepub fn backend_error(&self) -> Option<&Error>
pub fn backend_error(&self) -> Option<&Error>
Get the corresponding backend error, if error is caused by the backend.
Returns anyhow::Error; you need to cast this to the real backend error type
Trait Implementations§
source§impl Debug for RusticError
impl Debug for RusticError
source§impl Display for RusticError
impl Display for RusticError
source§impl Error for RusticError
impl Error for RusticError
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<E> From<E> for RusticError
impl<E> From<E> for RusticError
source§impl From<RusticErrorKind> for RusticError
impl From<RusticErrorKind> for RusticError
source§fn from(source: RusticErrorKind) -> Self
fn from(source: RusticErrorKind) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for RusticError
impl !RefUnwindSafe for RusticError
impl Send for RusticError
impl Sync for RusticError
impl Unpin for RusticError
impl !UnwindSafe for RusticError
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
source§impl<T> CustomError for T
impl<T> CustomError for T
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more