aws_sdk_s3/protocol_serde/
shape_inventory_optional_fields.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub fn de_inventory_optional_fields(
3    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
4) -> ::std::result::Result<::std::vec::Vec<crate::types::InventoryOptionalField>, ::aws_smithy_xml::decode::XmlDecodeError> {
5    let mut out = std::vec::Vec::new();
6    while let Some(mut tag) = decoder.next_tag() {
7        match tag.start_el() {
8            s if s.matches("Field") /* member com.amazonaws.s3#InventoryOptionalFields$member */ =>  {
9                out.push(
10                    Result::<crate::types::InventoryOptionalField, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
11                        crate::types::InventoryOptionalField::from(
12                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
13                        )
14                    )
15                    ?
16                );
17            }
18            ,
19            _ => {}
20        }
21    }
22    Ok(out)
23}