aws_sdk_s3/protocol_serde/
shape_replication_time_value.rspub fn ser_replication_time_value(
input: &crate::types::ReplicationTimeValue,
writer: ::aws_smithy_xml::encode::ElWriter,
) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> {
#[allow(unused_mut)]
let mut scope = writer.finish();
if let Some(var_1) = &input.minutes {
let mut inner_writer = scope.start_el("Minutes").finish();
inner_writer.data(::aws_smithy_types::primitive::Encoder::from(*var_1).encode());
}
scope.finish();
Ok(())
}
#[allow(clippy::needless_question_mark)]
pub fn de_replication_time_value(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::types::ReplicationTimeValue, ::aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::types::ReplicationTimeValue::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Minutes") => {
let var_2 =
Some(
{
<i32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#Minutes`)"))
}
?
)
;
builder = builder.set_minutes(var_2);
}
,
_ => {}
}
}
Ok(builder.build())
}