#[non_exhaustive]pub enum DescribeRulesError {
ListenerNotFoundException(ListenerNotFoundException),
RuleNotFoundException(RuleNotFoundException),
UnsupportedProtocolException(UnsupportedProtocolException),
Unhandled(Unhandled),
}
Expand description
Error type for the DescribeRulesError
operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ListenerNotFoundException(ListenerNotFoundException)
The specified listener does not exist.
RuleNotFoundException(RuleNotFoundException)
The specified rule does not exist.
UnsupportedProtocolException(UnsupportedProtocolException)
The specified protocol is not supported.
Unhandled(Unhandled)
Unhandled
directly is not forwards compatible. Instead, match using a variable wildcard pattern and check .code()
:
err if err.code() == Some("SpecificExceptionCode") => { /* handle the error */ }
See ProvideErrorMetadata
for what information is available for the error.An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
Implementations§
source§impl DescribeRulesError
impl DescribeRulesError
sourcepub fn unhandled(err: impl Into<Box<dyn Error + Send + Sync + 'static>>) -> Self
pub fn unhandled(err: impl Into<Box<dyn Error + Send + Sync + 'static>>) -> Self
Creates the DescribeRulesError::Unhandled
variant from any error type.
sourcepub fn generic(err: ErrorMetadata) -> Self
pub fn generic(err: ErrorMetadata) -> Self
Creates the DescribeRulesError::Unhandled
variant from an ErrorMetadata
.
sourcepub fn meta(&self) -> &ErrorMetadata
pub fn meta(&self) -> &ErrorMetadata
Returns error metadata, which includes the error code, message, request ID, and potentially additional information.
sourcepub fn is_listener_not_found_exception(&self) -> bool
pub fn is_listener_not_found_exception(&self) -> bool
Returns true
if the error kind is DescribeRulesError::ListenerNotFoundException
.
sourcepub fn is_rule_not_found_exception(&self) -> bool
pub fn is_rule_not_found_exception(&self) -> bool
Returns true
if the error kind is DescribeRulesError::RuleNotFoundException
.
sourcepub fn is_unsupported_protocol_exception(&self) -> bool
pub fn is_unsupported_protocol_exception(&self) -> bool
Returns true
if the error kind is DescribeRulesError::UnsupportedProtocolException
.
Trait Implementations§
source§impl CreateUnhandledError for DescribeRulesError
impl CreateUnhandledError for DescribeRulesError
source§fn create_unhandled_error(
source: Box<dyn Error + Send + Sync + 'static>,
meta: Option<ErrorMetadata>
) -> Self
fn create_unhandled_error( source: Box<dyn Error + Send + Sync + 'static>, meta: Option<ErrorMetadata> ) -> Self
source
and error metadata.source§impl Debug for DescribeRulesError
impl Debug for DescribeRulesError
source§impl Display for DescribeRulesError
impl Display for DescribeRulesError
source§impl Error for DescribeRulesError
impl Error for DescribeRulesError
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
source§impl From<DescribeRulesError> for Error
impl From<DescribeRulesError> for Error
source§fn from(err: DescribeRulesError) -> Self
fn from(err: DescribeRulesError) -> Self
source§impl ProvideErrorMetadata for DescribeRulesError
impl ProvideErrorMetadata for DescribeRulesError
source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
source§impl RequestId for DescribeRulesError
impl RequestId for DescribeRulesError
source§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None
if the service could not be reached.