pub fn de_grants(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
depth: u32,
) -> ::std::result::Result<::std::vec::Vec<crate::types::Grant>, ::aws_smithy_xml::decode::XmlDecodeError> {
if depth >= 128u32 {
return Err(::aws_smithy_xml::decode::XmlDecodeError::custom("maximum nesting depth exceeded"));
}
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Grant") => {
out.push(
crate::protocol_serde::shape_grant::de_grant(&mut tag, depth + 1)
?
);
}
,
_ => {}
}
}
Ok(out)
}