Struct aws_sdk_s3::error::GetObjectTorrentError
source · #[non_exhaustive]pub struct GetObjectTorrentError {
pub kind: GetObjectTorrentErrorKind,
/* private fields */
}
Expand description
Error type for the GetObjectTorrent
operation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.kind: GetObjectTorrentErrorKind
Kind of error that occurred.
Implementations§
source§impl GetObjectTorrentError
impl GetObjectTorrentError
sourcepub fn new(kind: GetObjectTorrentErrorKind, meta: Error) -> Self
pub fn new(kind: GetObjectTorrentErrorKind, meta: Error) -> Self
Creates a new GetObjectTorrentError
.
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 GetObjectTorrentError::Unhandled
variant from any error type.
Examples found in repository?
src/operation_deser.rs (line 2159)
2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163
pub fn parse_get_object_torrent(
op_response: &mut aws_smithy_http::operation::Response,
) -> std::result::Result<crate::output::GetObjectTorrentOutput, crate::error::GetObjectTorrentError>
{
#[allow(unused_variables)]
let (response, properties) = op_response.parts_mut();
Ok({
#[allow(unused_mut)]
let mut output = crate::output::get_object_torrent_output::Builder::default();
let _ = response;
output = output.set_body(Some(
crate::http_serde::deser_payload_get_object_torrent_get_object_torrent_output_body(
response.body_mut(),
)?,
));
output = output.set_request_charged(
crate::http_serde::deser_header_get_object_torrent_get_object_torrent_output_request_charged(response.headers())
.map_err(|_|crate::error::GetObjectTorrentError::unhandled("Failed to parse RequestCharged from header `x-amz-request-charged"))?
);
output.build()
})
}
sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the GetObjectTorrentError::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.
Trait Implementations§
source§impl Debug for GetObjectTorrentError
impl Debug for GetObjectTorrentError
source§impl Display for GetObjectTorrentError
impl Display for GetObjectTorrentError
source§impl Error for GetObjectTorrentError
impl Error for GetObjectTorrentError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()
source§impl From<GetObjectTorrentError> for Error
impl From<GetObjectTorrentError> for Error
source§fn from(err: GetObjectTorrentError) -> Self
fn from(err: GetObjectTorrentError) -> Self
Converts to this type from the input type.