pub struct StsError {
pub code: StsErrorCode,
pub message: String,
pub status_code: StatusCode,
pub source: Option<Box<dyn Error + Send + Sync>>,
}Expand description
An STS error response.
Fields§
§code: StsErrorCodeThe error code.
message: StringA human-readable error message.
status_code: StatusCodeThe HTTP status code.
source: Option<Box<dyn Error + Send + Sync>>The underlying source error, if any.
Implementations§
Source§impl StsError
impl StsError
Sourcepub fn new(code: StsErrorCode) -> Self
pub fn new(code: StsErrorCode) -> Self
Create a new StsError from an error code.
Sourcepub fn with_message(code: StsErrorCode, message: impl Into<String>) -> Self
pub fn with_message(code: StsErrorCode, message: impl Into<String>) -> Self
Create a new StsError with a custom message.
Sourcepub fn internal_error(message: impl Into<String>) -> Self
pub fn internal_error(message: impl Into<String>) -> Self
Internal error.
Sourcepub fn missing_action() -> Self
pub fn missing_action() -> Self
Missing action parameter.
Sourcepub fn unknown_operation(target: &str) -> Self
pub fn unknown_operation(target: &str) -> Self
Unknown operation.
Sourcepub fn not_implemented(operation: &str) -> Self
pub fn not_implemented(operation: &str) -> Self
Not implemented.
Sourcepub fn invalid_parameter_value(message: impl Into<String>) -> Self
pub fn invalid_parameter_value(message: impl Into<String>) -> Self
Invalid parameter value.
Sourcepub fn invalid_client_token_id(message: impl Into<String>) -> Self
pub fn invalid_client_token_id(message: impl Into<String>) -> Self
Invalid client token ID.
Sourcepub fn invalid_identity_token(message: impl Into<String>) -> Self
pub fn invalid_identity_token(message: impl Into<String>) -> Self
Invalid identity token.
Sourcepub fn malformed_policy(message: impl Into<String>) -> Self
pub fn malformed_policy(message: impl Into<String>) -> Self
Malformed policy document.
Sourcepub fn invalid_action(message: impl Into<String>) -> Self
pub fn invalid_action(message: impl Into<String>) -> Self
Invalid action.
Trait Implementations§
Source§impl Error for StsError
impl Error for StsError
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()
Auto Trait Implementations§
impl Freeze for StsError
impl !RefUnwindSafe for StsError
impl Send for StsError
impl Sync for StsError
impl Unpin for StsError
impl UnsafeUnpin for StsError
impl !UnwindSafe for StsError
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