UploadOptions#

pub struct UploadOptions#

Knobs for the network-side of a multipart upload.

Implementations#

impl UploadOptions
pub fn new() -> Self#
pub fn chunk_size(self, bytes: usize) -> Self#

Size of each uploaded part, in bytes. Defaults to 64 MiB. Must be at least 5 MiB except for the final part (S3 minimum).

pub fn max_concurrency(self, n: usize) -> Self#

Maximum number of parts uploaded concurrently. Defaults to 8.

pub fn max_retries(self, n: usize) -> Self#

Maximum number of retries per part on failure. Defaults to 3.

pub fn on_progress<F>(self, f: F) -> Self where F: Fn(UploadEvent) + Send + Sync + 'static#

Register a callback that receives progress events during the upload.

The callback runs from arbitrary tasks; keep it cheap. Forward events through a channel or atomic counter if you need to do real work.

Trait implementations#

impl Debug for UploadOptions
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Default for UploadOptions
fn default() -> Self

Derived: Clone

Auto traits: Send, Sync, Unpin, !UnwindSafe, !RefUnwindSafe