pub struct Builder { /* private fields */ }
Expand description

A builder for DeleteObjectsOutput.

Implementations§

Appends an item to deleted.

To override the contents of this collection use set_deleted.

Container element for a successful delete. It identifies the object that was successfully deleted.

Container element for a successful delete. It identifies the object that was successfully deleted.

Examples found in repository?
src/xml_deser.rs (line 407)
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
pub fn deser_operation_crate_operation_delete_objects(
    inp: &[u8],
    mut builder: crate::output::delete_objects_output::Builder,
) -> Result<crate::output::delete_objects_output::Builder, aws_smithy_xml::decode::XmlDecodeError> {
    let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;

    #[allow(unused_mut)]
    let mut decoder = doc.root_element()?;
    #[allow(unused_variables)]
    let start_el = decoder.start_el();
    if !start_el.matches("DeleteResult") {
        return Err(
                                aws_smithy_xml::decode::XmlDecodeError::custom(
                                    format!("encountered invalid XML root: expected DeleteResult but got {:?}. This is likely a bug in the SDK.", start_el)
                                )
                            );
    }
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("Error") /* Errors com.amazonaws.s3.synthetic#DeleteObjectsOutput$Errors */ =>  {
                let var_16 =
                    Some(
                        Result::<std::vec::Vec<crate::model::Error>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
                            let mut list_17 = builder.errors.take().unwrap_or_default();
                            list_17.push(
                                crate::xml_deser::deser_structure_crate_model_error(&mut tag)
                                ?
                            );
                            list_17
                        })
                        ?
                    )
                ;
                builder = builder.set_errors(var_16);
            }
            ,
            s if s.matches("Deleted") /* Deleted com.amazonaws.s3.synthetic#DeleteObjectsOutput$Deleted */ =>  {
                let var_18 =
                    Some(
                        Result::<std::vec::Vec<crate::model::DeletedObject>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
                            let mut list_19 = builder.deleted.take().unwrap_or_default();
                            list_19.push(
                                crate::xml_deser::deser_structure_crate_model_deleted_object(&mut tag)
                                ?
                            );
                            list_19
                        })
                        ?
                    )
                ;
                builder = builder.set_deleted(var_18);
            }
            ,
            _ => {}
        }
    }
    Ok(builder)
}

If present, indicates that the requester was successfully charged for the request.

If present, indicates that the requester was successfully charged for the request.

Examples found in repository?
src/operation_deser.rs (lines 800-809)
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
pub fn parse_delete_objects_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::DeleteObjectsOutput, crate::error::DeleteObjectsError> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::delete_objects_output::Builder::default();
        let _ = response;
        output = crate::xml_deser::deser_operation_crate_operation_delete_objects(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::DeleteObjectsError::unhandled)?;
        output = output.set_request_charged(
            crate::http_serde::deser_header_delete_objects_delete_objects_output_request_charged(
                response.headers(),
            )
            .map_err(|_| {
                crate::error::DeleteObjectsError::unhandled(
                    "Failed to parse RequestCharged from header `x-amz-request-charged",
                )
            })?,
        );
        output.build()
    })
}

Appends an item to errors.

To override the contents of this collection use set_errors.

Container for a failed delete action that describes the object that Amazon S3 attempted to delete and the error it encountered.

Container for a failed delete action that describes the object that Amazon S3 attempted to delete and the error it encountered.

Examples found in repository?
src/xml_deser.rs (line 390)
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
pub fn deser_operation_crate_operation_delete_objects(
    inp: &[u8],
    mut builder: crate::output::delete_objects_output::Builder,
) -> Result<crate::output::delete_objects_output::Builder, aws_smithy_xml::decode::XmlDecodeError> {
    let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;

    #[allow(unused_mut)]
    let mut decoder = doc.root_element()?;
    #[allow(unused_variables)]
    let start_el = decoder.start_el();
    if !start_el.matches("DeleteResult") {
        return Err(
                                aws_smithy_xml::decode::XmlDecodeError::custom(
                                    format!("encountered invalid XML root: expected DeleteResult but got {:?}. This is likely a bug in the SDK.", start_el)
                                )
                            );
    }
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("Error") /* Errors com.amazonaws.s3.synthetic#DeleteObjectsOutput$Errors */ =>  {
                let var_16 =
                    Some(
                        Result::<std::vec::Vec<crate::model::Error>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
                            let mut list_17 = builder.errors.take().unwrap_or_default();
                            list_17.push(
                                crate::xml_deser::deser_structure_crate_model_error(&mut tag)
                                ?
                            );
                            list_17
                        })
                        ?
                    )
                ;
                builder = builder.set_errors(var_16);
            }
            ,
            s if s.matches("Deleted") /* Deleted com.amazonaws.s3.synthetic#DeleteObjectsOutput$Deleted */ =>  {
                let var_18 =
                    Some(
                        Result::<std::vec::Vec<crate::model::DeletedObject>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
                            let mut list_19 = builder.deleted.take().unwrap_or_default();
                            list_19.push(
                                crate::xml_deser::deser_structure_crate_model_deleted_object(&mut tag)
                                ?
                            );
                            list_19
                        })
                        ?
                    )
                ;
                builder = builder.set_deleted(var_18);
            }
            ,
            _ => {}
        }
    }
    Ok(builder)
}

Consumes the builder and constructs a DeleteObjectsOutput.

Examples found in repository?
src/operation_deser.rs (line 810)
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
pub fn parse_delete_objects_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::DeleteObjectsOutput, crate::error::DeleteObjectsError> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::delete_objects_output::Builder::default();
        let _ = response;
        output = crate::xml_deser::deser_operation_crate_operation_delete_objects(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::DeleteObjectsError::unhandled)?;
        output = output.set_request_charged(
            crate::http_serde::deser_header_delete_objects_delete_objects_output_request_charged(
                response.headers(),
            )
            .map_err(|_| {
                crate::error::DeleteObjectsError::unhandled(
                    "Failed to parse RequestCharged from header `x-amz-request-charged",
                )
            })?,
        );
        output.build()
    })
}

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more