Trait mountpoint_s3_client::types::GetObjectRequest
source · pub trait GetObjectRequest: Stream<Item = ObjectClientResult<GetBodyPart, GetObjectError, Self::ClientError>> + Send {
type ClientError: Error + Send + Sync + 'static;
// Required method
fn increment_read_window(self: Pin<&mut Self>, len: usize);
}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§
type ClientError: Error + Send + Sync + 'static
Required Methods§
sourcefn increment_read_window(self: Pin<&mut Self>, len: usize)
fn increment_read_window(self: Pin<&mut Self>, len: usize)
Increment the flow-control window, so that response data continues downloading.
If the client was created with enable_read_backpressure set true,
each meta request has a flow-control window that shrinks as response
body data is downloaded (headers do not affect the size of the window).
The client’s initial_read_window determines the starting size of each meta request’s window.
If a meta request’s flow-control window reaches 0, no further data will be downloaded.
If the initial_read_window is 0, the request will not start until the window is incremented.
Maintain a larger window to keep up a high download throughput,
parts cannot download in parallel unless the window is large enough to hold multiple parts.
Maintain a smaller window to limit the amount of data buffered in memory.
If enable_read_backpressure is false this call will have no effect,
no backpressure is being applied and data is being downloaded as fast as possible.