1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 - | /// Error type for the `SelectObjectContentEventStreamError` operation.
|
3 - | #[non_exhaustive]
|
4 - | #[derive(::std::fmt::Debug)]
|
5 - | pub enum SelectObjectContentEventStreamError {
|
6 - | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
7 - | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
8 - | variable wildcard pattern and check `.code()`:
|
9 - | \
|
10 - | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|
11 - | \
|
12 - | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-SelectObjectContentEventStreamError) for what information is available for the error.")]
|
13 - | Unhandled(crate::error::sealed_unhandled::Unhandled),
|
14 - | }
|
15 - | impl SelectObjectContentEventStreamError {
|
16 - | /// Creates the `SelectObjectContentEventStreamError::Unhandled` variant from any error type.
|
17 - | pub fn unhandled(
|
18 - | err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
|
19 - | ) -> Self {
|
20 - | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
21 - | source: err.into(),
|
22 - | meta: ::std::default::Default::default(),
|
23 - | })
|
24 - | }
|
25 - |
|
26 - | /// Creates the `SelectObjectContentEventStreamError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
|
27 - | pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
|
28 - | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
29 - | source: err.clone().into(),
|
30 - | meta: err,
|
31 - | })
|
32 - | }
|
33 - | ///
|
34 - | /// Returns error metadata, which includes the error code, message,
|
35 - | /// request ID, and potentially additional information.
|
36 - | ///
|
37 - | pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
38 - | match self {
|
39 - | Self::Unhandled(e) => &e.meta,
|
40 - | }
|
41 - | }
|
42 - | }
|
43 - | impl ::std::error::Error for SelectObjectContentEventStreamError {
|
44 - | fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
45 - | match self {
|
46 - | Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
|
47 - | }
|
48 - | }
|
49 - | }
|
50 - | impl ::std::fmt::Display for SelectObjectContentEventStreamError {
|
51 - | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
52 - | match self {
|
53 - | Self::Unhandled(_inner) => {
|
54 - | if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
|
55 - | write!(f, "unhandled error ({code})")
|
56 - | } else {
|
57 - | f.write_str("unhandled error")
|
58 - | }
|
59 - | }
|
60 - | }
|
61 - | }
|
62 - | }
|
63 - | impl ::aws_smithy_types::retry::ProvideErrorKind for SelectObjectContentEventStreamError {
|
64 - | fn code(&self) -> ::std::option::Option<&str> {
|
65 - | ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
|
66 - | }
|
67 - | fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
|
68 - | ::std::option::Option::None
|
69 - | }
|
70 - | }
|
71 - | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for SelectObjectContentEventStreamError {
|
72 - | fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
73 - | match self {
|
74 - | Self::Unhandled(_inner) => &_inner.meta,
|
75 - | }
|
76 - | }
|
77 - | }
|
78 - | impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for SelectObjectContentEventStreamError {
|
79 - | fn create_unhandled_error(
|
80 - | source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
|
81 - | meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
|
82 - | ) -> Self {
|
83 - | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
84 - | source,
|
85 - | meta: meta.unwrap_or_default(),
|
86 - | })
|
87 - | }
|
88 - | }
|
89 - | impl crate::s3_request_id::RequestIdExt for crate::types::error::SelectObjectContentEventStreamError {
|
90 - | fn extended_request_id(&self) -> Option<&str> {
|
91 - | self.meta().extended_request_id()
|
92 - | }
|
93 - | }
|
94 - | impl ::aws_types::request_id::RequestId for crate::types::error::SelectObjectContentEventStreamError {
|
95 - | fn request_id(&self) -> Option<&str> {
|
96 - | self.meta().request_id()
|
97 - | }
|
98 - | }
|
99 - |
|
100 2 | pub use crate::types::error::_object_already_in_active_tier_error::ObjectAlreadyInActiveTierError;
|
101 3 |
|
102 - | pub use crate::types::error::_idempotency_parameter_mismatch::IdempotencyParameterMismatch;
|
103 - |
|
104 4 | pub use crate::types::error::_no_such_key::NoSuchKey;
|
105 5 |
|
106 6 | pub use crate::types::error::_too_many_parts::TooManyParts;
|
107 7 |
|
108 8 | pub use crate::types::error::_invalid_write_offset::InvalidWriteOffset;
|
109 9 |
|
110 10 | pub use crate::types::error::_invalid_request::InvalidRequest;
|
111 11 |
|
112 12 | pub use crate::types::error::_encryption_type_mismatch::EncryptionTypeMismatch;
|
113 13 |
|
114 14 | pub use crate::types::error::_no_such_bucket::NoSuchBucket;
|
115 15 |
|
116 16 | pub use crate::types::error::_not_found::NotFound;
|
117 17 |
|
118 18 | pub use crate::types::error::_invalid_object_state::InvalidObjectState;
|
119 19 |
|
120 20 | pub use crate::types::error::_bucket_already_owned_by_you::BucketAlreadyOwnedByYou;
|
121 21 |
|
122 22 | pub use crate::types::error::_bucket_already_exists::BucketAlreadyExists;
|
123 23 |
|
124 24 | pub use crate::types::error::_object_not_in_active_tier_error::ObjectNotInActiveTierError;
|
125 25 |
|
126 26 | pub use crate::types::error::_no_such_upload::NoSuchUpload;
|
127 27 |
|
128 28 | mod _bucket_already_exists;
|
129 29 |
|
130 30 | mod _bucket_already_owned_by_you;
|
131 31 |
|
132 32 | mod _encryption_type_mismatch;
|
133 33 |
|
134 - | mod _idempotency_parameter_mismatch;
|
135 - |
|
136 34 | mod _invalid_object_state;
|
137 35 |
|
138 36 | mod _invalid_request;
|
139 37 |
|
140 38 | mod _invalid_write_offset;
|
141 39 |
|
142 40 | mod _no_such_bucket;
|
143 41 |
|
144 42 | mod _no_such_key;
|
145 43 |
|