pub enum BackendError {
UnsupportedKeyType(KeyType),
KeyNotFound(String),
Unsupported(&'static str),
DecryptFailed,
UnsupportedAlgorithm(AeadAlgorithm),
Transport(String),
Backend(String),
Protocol(String),
}Expand description
Errors a backend may return. Service adapters map these to canonical gRPC statuses.
Variants§
UnsupportedKeyType(KeyType)
KeyNotFound(String)
Unsupported(&'static str)
The op (e.g. import/list/key_metadata) is not supported by this
backend kind. Distinct from BackendError::UnsupportedKeyType: the
operation itself has no implementation here.
DecryptFailed
AEAD authentication failed on decrypt: a wrong tag, a wrong key
version, or mismatched AAD. Deliberately opaque: it carries no detail
distinguishing the cause (no padding/AAD oracle), and the handler maps it
to the single decrypt_failed wire code.
UnsupportedAlgorithm(AeadAlgorithm)
The request’s algorithm does not match the key’s catalog keyType
(e.g. a chacha20-poly1305 request against an aes-256-gcm key), or the
AEAD suite is otherwise not usable for this key. Maps to the wire
unsupported_algorithm / invalid_request per the call site.
Transport(String)
Transport / HTTP failure talking to the backend.
Backend(String)
The backend was reachable but rejected or failed the operation.
Protocol(String)
A response from the backend could not be understood.
Trait Implementations§
Source§impl Debug for BackendError
impl Debug for BackendError
Source§impl Display for BackendError
impl Display for BackendError
Source§impl Error for BackendError
impl Error for BackendError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<BackendError> for ProviderError
impl From<BackendError> for ProviderError
Source§fn from(source: BackendError) -> Self
fn from(source: BackendError) -> Self
Source§impl From<BackendError> for ManagerError
impl From<BackendError> for ManagerError
Source§fn from(source: BackendError) -> Self
fn from(source: BackendError) -> Self
Source§impl From<BackendError> for GenericMintError
impl From<BackendError> for GenericMintError
Source§fn from(e: BackendError) -> Self
fn from(e: BackendError) -> Self
Auto Trait Implementations§
impl Freeze for BackendError
impl RefUnwindSafe for BackendError
impl Send for BackendError
impl Sync for BackendError
impl Unpin for BackendError
impl UnsafeUnpin for BackendError
impl UnwindSafe for BackendError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request