aws_sdk_ec2/protocol_serde/
shape_performance_factor_reference.rs1#[allow(unused_mut)]
3pub fn ser_performance_factor_reference(
4 mut writer: ::aws_smithy_query::QueryValueWriter,
5 input: &crate::types::PerformanceFactorReference,
6) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
7 #[allow(unused_mut)]
8 let mut scope_1 = writer.prefix("InstanceFamily");
9 if let Some(var_2) = &input.instance_family {
10 scope_1.string(var_2);
11 }
12 Ok(())
13}
14
15#[allow(clippy::needless_question_mark)]
16pub fn de_performance_factor_reference(
17 decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
18) -> ::std::result::Result<crate::types::PerformanceFactorReference, ::aws_smithy_xml::decode::XmlDecodeError> {
19 #[allow(unused_mut)]
20 let mut builder = crate::types::PerformanceFactorReference::builder();
21 while let Some(mut tag) = decoder.next_tag() {
22 match tag.start_el() {
23 s if s.matches("instanceFamily") => {
24 let var_3 =
25 Some(
26 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
27 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
28 .into()
29 )
30 ?
31 )
32 ;
33 builder = builder.set_instance_family(var_3);
34 }
35 ,
36 _ => {}
37 }
38 }
39 Ok(builder.build())
40}