Skip to main content

PreprocessCallback

Trait PreprocessCallback 

Source
pub trait PreprocessCallback {
    // Required method
    fn preprocess_before_upload<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 mut self,
        key: &'life1 str,
        source_object: &'life2 GetObjectOutput,
        metadata: &'life3 mut UploadMetadata,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
}

Required Methods§

Source

fn preprocess_before_upload<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, key: &'life1 str, source_object: &'life2 GetObjectOutput, metadata: &'life3 mut UploadMetadata, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Preprocess the object before uploading to S3. This method is called before the upload process starts. It can modify the UploadMetadata to set properties like content-type, user-defined metadata, etc.

If the error returned is PreprocessError::Cancelled, the upload will be canceled. If the error is any other type, it will be treated as a not-retryable error.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§