Struct aws_sdk_s3::error::no_such_upload::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for NoSuchUpload
.
Implementations§
source§impl Builder
impl Builder
pub fn message(self, input: impl Into<String>) -> Self
sourcepub fn set_message(self, input: Option<String>) -> Self
pub fn set_message(self, input: Option<String>) -> Self
Examples found in repository?
src/xml_deser.rs (line 44)
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
pub fn deser_structure_crate_error_no_such_upload_xml_err(
inp: &[u8],
mut builder: crate::error::no_such_upload::Builder,
) -> Result<crate::error::no_such_upload::Builder, aws_smithy_xml::decode::XmlDecodeError> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_unwrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("message") /* message com.amazonaws.s3#NoSuchUpload$message */ => {
let var_1 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_1);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn build(self) -> NoSuchUpload
pub fn build(self) -> NoSuchUpload
Consumes the builder and constructs a NoSuchUpload
.
Examples found in repository?
src/operation_deser.rs (line 31)
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
pub fn parse_abort_multipart_upload_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::AbortMultipartUploadOutput,
crate::error::AbortMultipartUploadError,
> {
let generic = crate::xml_deser::parse_http_generic_error(response)
.map_err(crate::error::AbortMultipartUploadError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => return Err(crate::error::AbortMultipartUploadError::unhandled(generic)),
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"NoSuchUpload" => crate::error::AbortMultipartUploadError {
meta: generic,
kind: crate::error::AbortMultipartUploadErrorKind::NoSuchUpload({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::no_such_upload::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_no_such_upload_xml_err(
response.body().as_ref(),
output,
)
.map_err(crate::error::AbortMultipartUploadError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::AbortMultipartUploadError::generic(generic),
})
}