Skip to main content

Uploader

Trait Uploader 

Source
pub trait Uploader: Send + Sync {
    // Required method
    fn run_upload(
        &self,
        request: UploadRequest<'_, Self>,
    ) -> impl Future<Output = Result<ObjectAttrs, Error>> + Send;

    // Provided method
    fn upload(
        &self,
        key: &str,
        data: impl Into<UploadBody>,
    ) -> UploadRequest<'_, Self> { ... }
}
Expand description

Upload objects. Implemented by a BucketRef granting perms::Uploader.

Required Methods§

Source

fn run_upload( &self, request: UploadRequest<'_, Self>, ) -> impl Future<Output = Result<ObjectAttrs, Error>> + Send

Runs the upload upload made, when it is awaited.

Provided Methods§

Source

fn upload( &self, key: &str, data: impl Into<UploadBody>, ) -> UploadRequest<'_, Self>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<P: BucketPerms> Uploader for BucketRef<P>
where P::Upload: Granted<Uploader>,