aws_sdk_s3/protocol_serde/
shape_existing_object_replication.rspub fn ser_existing_object_replication(
input: &crate::types::ExistingObjectReplication,
writer: ::aws_smithy_xml::encode::ElWriter,
) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> {
#[allow(unused_mut)]
let mut scope = writer.finish();
{
let mut inner_writer = scope.start_el("Status").finish();
inner_writer.data(input.status.as_str());
}
scope.finish();
Ok(())
}
#[allow(clippy::needless_question_mark)]
pub fn de_existing_object_replication(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::types::ExistingObjectReplication, ::aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::types::ExistingObjectReplication::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Status") => {
let var_1 =
Some(
Result::<crate::types::ExistingObjectReplicationStatus, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::types::ExistingObjectReplicationStatus::from(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_1);
}
,
_ => {}
}
}
Ok(crate::serde_util::existing_object_replication_correct_errors(builder)
.build()
.map_err(|_| ::aws_smithy_xml::decode::XmlDecodeError::custom("missing field"))?)
}