aws_sdk_cloudfront/protocol_serde/
shape_get_function_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub(crate) fn de_content_type_header(
3    header_map: &::aws_smithy_runtime_api::http::Headers,
4) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
5    let headers = header_map.get_all("Content-Type");
6    ::aws_smithy_http::header::one_or_none(headers)
7}
8
9pub(crate) fn de_e_tag_header(
10    header_map: &::aws_smithy_runtime_api::http::Headers,
11) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
12    let headers = header_map.get_all("ETag");
13    ::aws_smithy_http::header::one_or_none(headers)
14}
15
16pub(crate) fn de_function_code_payload(
17    body: &[u8],
18) -> std::result::Result<::std::option::Option<::aws_smithy_types::Blob>, crate::operation::get_function::GetFunctionError> {
19    (!body.is_empty()).then(|| Ok(::aws_smithy_types::Blob::new(body))).transpose()
20}