aws_sdk_s3/protocol_serde/
shape_head_bucket_output.rs
1pub(crate) fn de_access_point_alias_header(
3 header_map: &::aws_smithy_runtime_api::http::Headers,
4) -> ::std::result::Result<::std::option::Option<bool>, ::aws_smithy_http::header::ParseError> {
5 let headers = header_map.get_all("x-amz-access-point-alias");
6 let var_1 = ::aws_smithy_http::header::read_many_primitive::<bool>(headers)?;
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_bucket_location_name_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-bucket-location-name");
22 ::aws_smithy_http::header::one_or_none(headers)
23}
24
25pub(crate) fn de_bucket_location_type_header(
26 header_map: &::aws_smithy_runtime_api::http::Headers,
27) -> ::std::result::Result<::std::option::Option<crate::types::LocationType>, ::aws_smithy_http::header::ParseError> {
28 let headers = header_map.get_all("x-amz-bucket-location-type");
29 ::aws_smithy_http::header::one_or_none(headers)
30}
31
32pub(crate) fn de_bucket_region_header(
33 header_map: &::aws_smithy_runtime_api::http::Headers,
34) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
35 let headers = header_map.get_all("x-amz-bucket-region");
36 ::aws_smithy_http::header::one_or_none(headers)
37}