Trait UploadControl

Source
pub trait UploadControl {
    // Required methods
    fn target_part_size(&self) -> usize;
    fn is_upload_ready(&self, upload_size: usize, num_parts: usize) -> bool;

    // Provided method
    fn is_part_ready(&self, part_size: usize) -> bool { ... }
}
Expand description

An interface for controlling the “checkpoints” of uploading parts and completing uploads.

Required Methods§

Source

fn target_part_size(&self) -> usize

The desired part size in bytes.

Source

fn is_upload_ready(&self, upload_size: usize, num_parts: usize) -> bool

Whether the overall upload is complete.

Provided Methods§

Source

fn is_part_ready(&self, part_size: usize) -> bool

Whether one part in the upload is complete.

Implementations on Foreign Types§

Source§

impl<C: UploadControl> UploadControl for Arc<C>

Source§

fn target_part_size(&self) -> usize

Source§

fn is_upload_ready(&self, upload_size: usize, num_parts: usize) -> bool

Implementors§