GetObjectResponse

Trait GetObjectResponse 

Source
pub trait GetObjectResponse:
    Stream<Item = ObjectClientResult<GetBodyPart, GetObjectError, Self::ClientError>>
    + Send
    + Sync {
    type BackpressureHandle: ClientBackpressureHandle + Clone + Send + Sync;
    type ClientError: Error + Send + Sync + 'static;

    // Required methods
    fn backpressure_handle(&mut self) -> Option<&mut Self::BackpressureHandle>;
    fn get_object_metadata(&self) -> HashMap<String, String>;
    fn get_object_checksum(&self) -> Result<Checksum, ObjectChecksumError>;
}
Expand description

A streaming response to a GetObject request.

This struct implements futures::Stream, which you can use to read the body of the object. Each item of the stream is a part of the object body together with the part’s offset within the object.

Required Associated Types§

Required Methods§

Source

fn backpressure_handle(&mut self) -> Option<&mut Self::BackpressureHandle>

Take the backpressure handle from the response.

If enable_read_backpressure is false this call will return None, no backpressure is being applied and data is being downloaded as fast as possible.

Source

fn get_object_metadata(&self) -> HashMap<String, String>

Get the object’s user defined metadata.

Source

fn get_object_checksum(&self) -> Result<Checksum, ObjectChecksumError>

Get the object’s checksum, if uploaded with one

Implementors§