aws_sdk_s3/protocol_serde/
shape_error.rs
1#[allow(clippy::needless_question_mark)]
3pub fn de_error(decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder) -> Result<crate::types::Error, ::aws_smithy_xml::decode::XmlDecodeError> {
4 #[allow(unused_mut)]
5 let mut builder = crate::types::Error::builder();
6 while let Some(mut tag) = decoder.next_tag() {
7 match tag.start_el() {
8 s if s.matches("Key") => {
9 let var_1 =
10 Some(
11 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
12 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
13 .into()
14 )
15 ?
16 )
17 ;
18 builder = builder.set_key(var_1);
19 }
20 ,
21 s if s.matches("VersionId") => {
22 let var_2 =
23 Some(
24 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
25 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
26 .into()
27 )
28 ?
29 )
30 ;
31 builder = builder.set_version_id(var_2);
32 }
33 ,
34 s if s.matches("Code") => {
35 let var_3 =
36 Some(
37 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
38 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
39 .into()
40 )
41 ?
42 )
43 ;
44 builder = builder.set_code(var_3);
45 }
46 ,
47 s if s.matches("Message") => {
48 let var_4 =
49 Some(
50 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
51 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
52 .into()
53 )
54 ?
55 )
56 ;
57 builder = builder.set_message(var_4);
58 }
59 ,
60 _ => {}
61 }
62 }
63 Ok(builder.build())
64}