pub struct DownloadFileBuilder<'a> { /* private fields */ }
Implementations§
Source§impl<'a> DownloadFileBuilder<'a>
impl<'a> DownloadFileBuilder<'a>
Sourcepub fn range(self, range: ByteRange) -> Self
pub fn range(self, range: ByteRange) -> Self
Specify the byte range of the file to download.
There will be a Content-Range header that specifies the bytes returned and the total number of bytes.
The HTTP status code when a partial file is returned is 206 Partial Content
rather than 200 OK
.
Sourcepub fn content_disposition(
self,
disposition: &'a ContentDisposition,
) -> Result<Self, ValidationError>
pub fn content_disposition( self, disposition: &'a ContentDisposition, ) -> Result<Self, ValidationError>
Override the Content-Disposition header of the response with the one provided.
If including this header will exceed the 7,000 byte header limit (2,048 bytes if using server-side encryption), the request will be rejected.
Sourcepub fn content_language(self, language: &'a str) -> Self
pub fn content_language(self, language: &'a str) -> Self
Override the Content-Language header of the response with the one provided.
If including this header will exceed the 7,000 byte header limit (2,048 bytes if using server-side encryption), the request will be rejected.
Sourcepub fn expiration(self, expiration: Expires) -> Self
pub fn expiration(self, expiration: Expires) -> Self
Override the Expires header of the response with the one provided.
If including this header will exceed the 7,000 byte header limit (2,048 bytes if using server-side encryption), the request will be rejected.
Sourcepub fn cache_control(self, cache_control: CacheControl) -> Self
pub fn cache_control(self, cache_control: CacheControl) -> Self
Override the Cache-Control header of the response with the one provided.
If including this header will exceed the 7,000 byte header limit (2,048 bytes if using server-side encryption), the request will be rejected.
Sourcepub fn content_encoding(self, encoding: ContentEncoding) -> Self
pub fn content_encoding(self, encoding: ContentEncoding) -> Self
Override the Content-Encoding header of the response with the one provided.
If including this header will exceed the 7,000 byte header limit (2,048 bytes if using server-side encryption), the request will be rejected.
Sourcepub fn content_type(self, content_type: impl Into<Mime>) -> Self
pub fn content_type(self, content_type: impl Into<Mime>) -> Self
Override the Content-Type header of the response with the one provided.
If including this header will exceed the 7,000 byte header limit (2,048 bytes if using server-side encryption), the request will be rejected.
Sourcepub fn encryption_settings(self, settings: ServerSideEncryption) -> Self
pub fn encryption_settings(self, settings: ServerSideEncryption) -> Self
Set the encryption settings to use for the file.
This is required if using self-managed server-side encryption.
Sourcepub fn build(self) -> Result<DownloadFile<'a>, ValidationError>
pub fn build(self) -> Result<DownloadFile<'a>, ValidationError>
Build a DownloadFile request.