aws_sdk_ec2/protocol_serde/
shape_ipv6_range.rs1#[allow(unused_mut)]
3pub fn ser_ipv6_range(
4 mut writer: ::aws_smithy_query::QueryValueWriter,
5 input: &crate::types::Ipv6Range,
6) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
7 #[allow(unused_mut)]
8 let mut scope_1 = writer.prefix("Description");
9 if let Some(var_2) = &input.description {
10 scope_1.string(var_2);
11 }
12 #[allow(unused_mut)]
13 let mut scope_3 = writer.prefix("CidrIpv6");
14 if let Some(var_4) = &input.cidr_ipv6 {
15 scope_3.string(var_4);
16 }
17 Ok(())
18}
19
20#[allow(clippy::needless_question_mark)]
21pub fn de_ipv6_range(
22 decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
23) -> ::std::result::Result<crate::types::Ipv6Range, ::aws_smithy_xml::decode::XmlDecodeError> {
24 #[allow(unused_mut)]
25 let mut builder = crate::types::Ipv6Range::builder();
26 while let Some(mut tag) = decoder.next_tag() {
27 match tag.start_el() {
28 s if s.matches("description") => {
29 let var_5 =
30 Some(
31 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
32 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
33 .into()
34 )
35 ?
36 )
37 ;
38 builder = builder.set_description(var_5);
39 }
40 ,
41 s if s.matches("cidrIpv6") => {
42 let var_6 =
43 Some(
44 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
45 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
46 .into()
47 )
48 ?
49 )
50 ;
51 builder = builder.set_cidr_ipv6(var_6);
52 }
53 ,
54 _ => {}
55 }
56 }
57 Ok(builder.build())
58}