# 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`](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html)

**Auto traits**: [`Send`](https://doc.rust-lang.org/1.98.1/core/marker/trait.Send.html), [`Sync`](https://doc.rust-lang.org/1.98.1/core/marker/trait.Sync.html), [`Unpin`](https://doc.rust-lang.org/1.98.1/core/marker/trait.Unpin.html), [`!UnwindSafe`](https://doc.rust-lang.org/1.98.1/core/panic/unwind_safe/trait.UnwindSafe.html), [`!RefUnwindSafe`](https://doc.rust-lang.org/1.98.1/core/panic/unwind_safe/trait.RefUnwindSafe.html)
