aws_sdk_cloudfront/protocol_serde/
shape_update_function_output.rs1pub(crate) fn de_e_tag_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("ETtag");
6 ::aws_smithy_http::header::one_or_none(headers)
7}
8
9pub(crate) fn de_function_summary_payload(
10 body: &[u8],
11) -> std::result::Result<::std::option::Option<crate::types::FunctionSummary>, crate::operation::update_function::UpdateFunctionError> {
12 (!body.is_empty())
13 .then(|| {
14 crate::protocol_serde::shape_update_function_output::de_function_summary(body)
15 .map_err(crate::operation::update_function::UpdateFunctionError::unhandled)
16 })
17 .transpose()
18}
19
20pub fn de_function_summary(inp: &[u8]) -> std::result::Result<crate::types::FunctionSummary, ::aws_smithy_xml::decode::XmlDecodeError> {
21 let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;
22 #[allow(unused_mut)]
23 let mut decoder = doc.root_element()?;
24 let start_el = decoder.start_el();
25 if !(start_el.matches("FunctionSummary")) {
26 return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
27 "invalid root, expected FunctionSummary got {:?}",
28 start_el
29 )));
30 }
31 crate::protocol_serde::shape_function_summary::de_function_summary(&mut decoder)
32}