Struct aws::s3::S3Uploader[][src]

struct S3Uploader<'client> {
    client: &'client S3Client,
    bucket: String,
    key: String,
    acl: Option<StringNonEmpty>,
    server_side_encryption: Option<StringNonEmpty>,
    sse_kms_key_id: Option<StringNonEmpty>,
    storage_class: Option<StringNonEmpty>,
    upload_id: String,
    parts: Vec<CompletedPart>,
}

A helper for uploading a large files to S3 storage.

Note: this uploader does not support uploading files larger than 19.5 GiB.

Fields

client: &'client S3Clientbucket: Stringkey: Stringacl: Option<StringNonEmpty>server_side_encryption: Option<StringNonEmpty>sse_kms_key_id: Option<StringNonEmpty>storage_class: Option<StringNonEmpty>upload_id: Stringparts: Vec<CompletedPart>

Implementations

impl<'client> S3Uploader<'client>[src]

fn new(client: &'client S3Client, config: &Config, key: String) -> Self[src]

Creates a new uploader with a given target location and upload configuration.

async fn run(
    self,
    reader: &mut (dyn AsyncRead + Unpin),
    est_len: u64
) -> Result<(), Box<dyn Error>>
[src]

Executes the upload process.

async fn begin(&self) -> Result<String, RusotoError<CreateMultipartUploadError>>[src]

Starts a multipart upload process.

async fn complete(
    &self
) -> Result<(), RusotoError<CompleteMultipartUploadError>>
[src]

Completes a multipart upload process, asking S3 to join all parts into a single file.

async fn abort(&self) -> Result<(), RusotoError<AbortMultipartUploadError>>[src]

Aborts the multipart upload process, deletes all uploaded parts.

async fn upload_part(
    &self,
    part_number: i64,
    data: &[u8]
) -> Result<CompletedPart, RusotoError<UploadPartError>>
[src]

Uploads a part of the file.

The part_number must be between 1 to 10000.

async fn upload(&self, data: &[u8]) -> Result<(), RusotoError<PutObjectError>>[src]

Uploads a file atomically.

This should be used only when the data is known to be short, and thus relatively cheap to retry the entire upload.

fn get_timeout() -> Duration[src]

Auto Trait Implementations

impl<'client> !RefUnwindSafe for S3Uploader<'client>

impl<'client> Send for S3Uploader<'client>

impl<'client> Sync for S3Uploader<'client>

impl<'client> Unpin for S3Uploader<'client>

impl<'client> !UnwindSafe for S3Uploader<'client>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> Sealed<T> for T where
    T: ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]