aws_sdk_s3/protocol_serde/
shape_get_object_torrent_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub fn de_body_payload(
3    body: &mut ::aws_smithy_types::body::SdkBody,
4) -> std::result::Result<::aws_smithy_types::byte_stream::ByteStream, crate::operation::get_object_torrent::GetObjectTorrentError> {
5    // replace the body with an empty body
6    let body = std::mem::replace(body, ::aws_smithy_types::body::SdkBody::taken());
7    Ok(::aws_smithy_types::byte_stream::ByteStream::new(body))
8}
9
10pub(crate) fn de_request_charged_header(
11    header_map: &::aws_smithy_runtime_api::http::Headers,
12) -> ::std::result::Result<::std::option::Option<crate::types::RequestCharged>, ::aws_smithy_http::header::ParseError> {
13    let headers = header_map.get_all("x-amz-request-charged");
14    ::aws_smithy_http::header::one_or_none(headers)
15}