aws_sdk_s3/types/
error.rs#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum SelectObjectContentEventStreamError {
#[deprecated(note = "Matching `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`](#impl-ProvideErrorMetadata-for-SelectObjectContentEventStreamError) for what information is available for the error.")]
Unhandled(crate::error::sealed_unhandled::Unhandled),
}
impl SelectObjectContentEventStreamError {
pub fn unhandled(
err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
) -> Self {
Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
source: err.into(),
meta: ::std::default::Default::default(),
})
}
pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
source: err.clone().into(),
meta: err,
})
}
pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
match self {
Self::Unhandled(e) => &e.meta,
}
}
}
impl ::std::error::Error for SelectObjectContentEventStreamError {
fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
match self {
Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
}
}
}
impl ::std::fmt::Display for SelectObjectContentEventStreamError {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
Self::Unhandled(_inner) => {
if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
write!(f, "unhandled error ({code})")
} else {
f.write_str("unhandled error")
}
}
}
}
}
impl ::aws_smithy_types::retry::ProvideErrorKind for SelectObjectContentEventStreamError {
fn code(&self) -> ::std::option::Option<&str> {
::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
}
fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
::std::option::Option::None
}
}
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for SelectObjectContentEventStreamError {
fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
match self {
Self::Unhandled(_inner) => &_inner.meta,
}
}
}
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for SelectObjectContentEventStreamError {
fn create_unhandled_error(
source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
) -> Self {
Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
source,
meta: meta.unwrap_or_default(),
})
}
}
impl crate::s3_request_id::RequestIdExt for crate::types::error::SelectObjectContentEventStreamError {
fn extended_request_id(&self) -> Option<&str> {
self.meta().extended_request_id()
}
}
impl ::aws_types::request_id::RequestId for crate::types::error::SelectObjectContentEventStreamError {
fn request_id(&self) -> Option<&str> {
self.meta().request_id()
}
}
pub use crate::types::error::_object_already_in_active_tier_error::ObjectAlreadyInActiveTierError;
pub use crate::types::error::_no_such_key::NoSuchKey;
pub use crate::types::error::_too_many_parts::TooManyParts;
pub use crate::types::error::_invalid_write_offset::InvalidWriteOffset;
pub use crate::types::error::_invalid_request::InvalidRequest;
pub use crate::types::error::_encryption_type_mismatch::EncryptionTypeMismatch;
pub use crate::types::error::_no_such_bucket::NoSuchBucket;
pub use crate::types::error::_not_found::NotFound;
pub use crate::types::error::_invalid_object_state::InvalidObjectState;
pub use crate::types::error::_bucket_already_owned_by_you::BucketAlreadyOwnedByYou;
pub use crate::types::error::_bucket_already_exists::BucketAlreadyExists;
pub use crate::types::error::_object_not_in_active_tier_error::ObjectNotInActiveTierError;
pub use crate::types::error::_no_such_upload::NoSuchUpload;
mod _bucket_already_exists;
mod _bucket_already_owned_by_you;
mod _encryption_type_mismatch;
mod _invalid_object_state;
mod _invalid_request;
mod _invalid_write_offset;
mod _no_such_bucket;
mod _no_such_key;
mod _no_such_upload;
mod _not_found;
mod _object_already_in_active_tier_error;
mod _object_not_in_active_tier_error;
mod _too_many_parts;
pub mod builders;