#[non_exhaustive]pub struct CreatePullRequestApprovalRuleError {
pub kind: CreatePullRequestApprovalRuleErrorKind,
/* private fields */
}
Expand description
Error type for the CreatePullRequestApprovalRule
operation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.kind: CreatePullRequestApprovalRuleErrorKind
Kind of error that occurred.
Implementations§
source§impl CreatePullRequestApprovalRuleError
impl CreatePullRequestApprovalRuleError
sourcepub fn new(kind: CreatePullRequestApprovalRuleErrorKind, meta: Error) -> Self
pub fn new(kind: CreatePullRequestApprovalRuleErrorKind, meta: Error) -> Self
Creates a new CreatePullRequestApprovalRuleError
.
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 CreatePullRequestApprovalRuleError::Unhandled
variant from any error type.
sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the CreatePullRequestApprovalRuleError::Unhandled
variant from a aws_smithy_types::Error
.
sourcepub fn meta(&self) -> &Error
pub fn meta(&self) -> &Error
Returns error metadata, which includes the error code, message, request ID, and potentially additional information.
sourcepub fn request_id(&self) -> Option<&str>
pub fn request_id(&self) -> Option<&str>
Returns the request ID if it’s available.
sourcepub fn is_approval_rule_content_required_exception(&self) -> bool
pub fn is_approval_rule_content_required_exception(&self) -> bool
Returns true
if the error kind is CreatePullRequestApprovalRuleErrorKind::ApprovalRuleContentRequiredException
.
sourcepub fn is_approval_rule_name_already_exists_exception(&self) -> bool
pub fn is_approval_rule_name_already_exists_exception(&self) -> bool
Returns true
if the error kind is CreatePullRequestApprovalRuleErrorKind::ApprovalRuleNameAlreadyExistsException
.
sourcepub fn is_approval_rule_name_required_exception(&self) -> bool
pub fn is_approval_rule_name_required_exception(&self) -> bool
Returns true
if the error kind is CreatePullRequestApprovalRuleErrorKind::ApprovalRuleNameRequiredException
.
sourcepub fn is_encryption_integrity_checks_failed_exception(&self) -> bool
pub fn is_encryption_integrity_checks_failed_exception(&self) -> bool
Returns true
if the error kind is CreatePullRequestApprovalRuleErrorKind::EncryptionIntegrityChecksFailedException
.
sourcepub fn is_encryption_key_access_denied_exception(&self) -> bool
pub fn is_encryption_key_access_denied_exception(&self) -> bool
Returns true
if the error kind is CreatePullRequestApprovalRuleErrorKind::EncryptionKeyAccessDeniedException
.
sourcepub fn is_encryption_key_disabled_exception(&self) -> bool
pub fn is_encryption_key_disabled_exception(&self) -> bool
Returns true
if the error kind is CreatePullRequestApprovalRuleErrorKind::EncryptionKeyDisabledException
.
sourcepub fn is_encryption_key_not_found_exception(&self) -> bool
pub fn is_encryption_key_not_found_exception(&self) -> bool
Returns true
if the error kind is CreatePullRequestApprovalRuleErrorKind::EncryptionKeyNotFoundException
.
Returns true
if the error kind is CreatePullRequestApprovalRuleErrorKind::EncryptionKeyUnavailableException
.
sourcepub fn is_invalid_approval_rule_content_exception(&self) -> bool
pub fn is_invalid_approval_rule_content_exception(&self) -> bool
Returns true
if the error kind is CreatePullRequestApprovalRuleErrorKind::InvalidApprovalRuleContentException
.
sourcepub fn is_invalid_approval_rule_name_exception(&self) -> bool
pub fn is_invalid_approval_rule_name_exception(&self) -> bool
Returns true
if the error kind is CreatePullRequestApprovalRuleErrorKind::InvalidApprovalRuleNameException
.
sourcepub fn is_invalid_pull_request_id_exception(&self) -> bool
pub fn is_invalid_pull_request_id_exception(&self) -> bool
Returns true
if the error kind is CreatePullRequestApprovalRuleErrorKind::InvalidPullRequestIdException
.
sourcepub fn is_number_of_rules_exceeded_exception(&self) -> bool
pub fn is_number_of_rules_exceeded_exception(&self) -> bool
Returns true
if the error kind is CreatePullRequestApprovalRuleErrorKind::NumberOfRulesExceededException
.
sourcepub fn is_pull_request_already_closed_exception(&self) -> bool
pub fn is_pull_request_already_closed_exception(&self) -> bool
Returns true
if the error kind is CreatePullRequestApprovalRuleErrorKind::PullRequestAlreadyClosedException
.
sourcepub fn is_pull_request_does_not_exist_exception(&self) -> bool
pub fn is_pull_request_does_not_exist_exception(&self) -> bool
Returns true
if the error kind is CreatePullRequestApprovalRuleErrorKind::PullRequestDoesNotExistException
.
sourcepub fn is_pull_request_id_required_exception(&self) -> bool
pub fn is_pull_request_id_required_exception(&self) -> bool
Returns true
if the error kind is CreatePullRequestApprovalRuleErrorKind::PullRequestIdRequiredException
.