pub enum KasError {
Show 14 variants
HttpError {
status: u16,
message: String,
},
AccessDenied {
resource: String,
reason: String,
},
AuthenticationFailed {
reason: String,
},
InvalidResponse {
reason: String,
expected: Option<String>,
},
UnwrapError {
algorithm: String,
reason: String,
},
CryptoError {
operation: String,
reason: String,
},
SerializationError(Error),
Base64Error(DecodeError),
JwtError {
operation: String,
reason: String,
},
Pkcs8Error(String),
RequestError {
method: String,
url: String,
reason: String,
},
Timeout {
timeout_ms: u64,
},
ConfigError {
reason: String,
},
InvalidUrl(String),
}Expand description
KAS client errors
Variants§
HttpError
AccessDenied
AuthenticationFailed
InvalidResponse
UnwrapError
CryptoError
SerializationError(Error)
Base64Error(DecodeError)
JwtError
Pkcs8Error(String)
RequestError
Timeout
ConfigError
InvalidUrl(String)
Implementations§
Source§impl KasError
impl KasError
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Returns true if this error might be resolved by retrying the operation
Sourcepub fn suggestion(&self) -> Option<&str>
pub fn suggestion(&self) -> Option<&str>
Returns a suggestion for how to fix this error, if available
Sourcepub fn error_code(&self) -> &'static str
pub fn error_code(&self) -> &'static str
Returns an error code for programmatic error handling
Trait Implementations§
Source§impl Error for KasError
impl Error for KasError
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 KasError
impl From<DecodeError> for KasError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for KasError
impl !UnwindSafe for KasError
impl Forget for KasError
impl Freeze for KasError
impl Send for KasError
impl Sync for KasError
impl Unpin for KasError
impl UnsafeUnpin for KasError
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