pub enum VaultError {
Show 16 variants
Http(Error),
MissingKey(String),
MissingPrivateKey,
KeyRotated,
KeyUnverifiable,
InvalidInput(String),
InvalidUrl(String),
AttachmentTooLarge {
size: u64,
cap: u64,
},
Locked,
Unauthorized,
Forbidden(String),
NotFound(String),
RateLimited {
retry_after: Option<u64>,
},
Api {
status: u16,
body: String,
},
Crypto(Error),
InvalidResponse(String),
}Expand description
Everything the connector can fail with, named so the facade can branch on it without parsing strings. A 401 is the refresh trigger; a 404 names a missing item; a 429 carries the server’s retry hint.
Variants§
Http(Error)
The failure class only. A signed download URL carries its token in the query string, so no error may print the URL it was sent to.
MissingKey(String)
MissingPrivateKey
KeyRotated
KeyUnverifiable
InvalidInput(String)
InvalidUrl(String)
AttachmentTooLarge
Locked
Forbidden(String)
NotFound(String)
RateLimited
Api
Crypto(Error)
InvalidResponse(String)
Trait Implementations§
Source§impl Debug for VaultError
impl Debug for VaultError
Source§impl Display for VaultError
impl Display for VaultError
Source§impl Error for VaultError
impl Error for VaultError
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<Error> for VaultError
impl From<Error> for VaultError
Auto Trait Implementations§
impl !RefUnwindSafe for VaultError
impl !UnwindSafe for VaultError
impl Freeze for VaultError
impl Send for VaultError
impl Sync for VaultError
impl Unpin for VaultError
impl UnsafeUnpin for VaultError
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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