aws_sdk_s3/protocol_serde/
shape_list_parts_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub(crate) fn de_abort_date_header(
3    header_map: &::aws_smithy_runtime_api::http::Headers,
4) -> ::std::result::Result<::std::option::Option<::aws_smithy_types::DateTime>, ::aws_smithy_http::header::ParseError> {
5    let headers = header_map.get_all("x-amz-abort-date");
6    let var_1: Vec<::aws_smithy_types::DateTime> = ::aws_smithy_http::header::many_dates(headers, ::aws_smithy_types::date_time::Format::HttpDate)?;
7    if var_1.len() > 1 {
8        Err(::aws_smithy_http::header::ParseError::new(format!(
9            "expected one item but found {}",
10            var_1.len()
11        )))
12    } else {
13        let mut var_1 = var_1;
14        Ok(var_1.pop())
15    }
16}
17
18pub(crate) fn de_abort_rule_id_header(
19    header_map: &::aws_smithy_runtime_api::http::Headers,
20) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
21    let headers = header_map.get_all("x-amz-abort-rule-id");
22    ::aws_smithy_http::header::one_or_none(headers)
23}
24
25pub(crate) fn de_request_charged_header(
26    header_map: &::aws_smithy_runtime_api::http::Headers,
27) -> ::std::result::Result<::std::option::Option<crate::types::RequestCharged>, ::aws_smithy_http::header::ParseError> {
28    let headers = header_map.get_all("x-amz-request-charged");
29    ::aws_smithy_http::header::one_or_none(headers)
30}