S3Ext

Trait S3Ext 

Source
pub trait S3Ext {
    // Required methods
    fn download_to_file<'life0, 'async_trait, F>(
        &'life0 self,
        source: GetObjectRequest,
        target: F,
    ) -> Pin<Box<dyn Future<Output = S3ExtResult<GetObjectOutput>> + Send + 'async_trait>>
       where F: AsRef<Path> + Send + Sync + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn upload_from_file<'life0, 'async_trait, F>(
        &'life0 self,
        source: F,
        target: PutObjectRequest,
    ) -> Pin<Box<dyn Future<Output = S3ExtResult<PutObjectOutput>> + Send + 'async_trait>>
       where F: AsRef<Path> + Send + Sync + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn upload_from_file_multipart<'life0, 'async_trait, F>(
        &'life0 self,
        source: F,
        target: PutObjectRequest,
        part_size: usize,
    ) -> Pin<Box<dyn Future<Output = S3ExtResult<CompleteMultipartUploadOutput>> + Send + 'async_trait>>
       where F: AsRef<Path> + Send + Sync + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn download<'life0, 'life1, 'async_trait, W>(
        &'life0 self,
        source: GetObjectRequest,
        target: &'life1 mut W,
    ) -> Pin<Box<dyn Future<Output = S3ExtResult<GetObjectOutput>> + Send + 'async_trait>>
       where W: AsyncWrite + Unpin + Send + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn upload<'life0, 'life1, 'async_trait, R>(
        &'life0 self,
        source: &'life1 mut R,
        target: PutObjectRequest,
    ) -> Pin<Box<dyn Future<Output = S3ExtResult<PutObjectOutput>> + Send + 'async_trait>>
       where R: AsyncRead + Unpin + Send + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn upload_multipart<'life0, 'life1, 'async_trait, R>(
        &'life0 self,
        source: &'life1 mut R,
        target: PutObjectRequest,
        part_size: usize,
    ) -> Pin<Box<dyn Future<Output = S3ExtResult<CompleteMultipartUploadOutput>> + Send + 'async_trait>>
       where R: AsyncRead + Unpin + Send + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn stream_objects(&self, bucket: impl Into<String>) -> ObjectStream;
    fn stream_objects_with_prefix(
        &self,
        bucket: impl Into<String>,
        prefix: impl Into<String>,
    ) -> ObjectStream;
    fn stream_get_objects(&self, bucket: impl Into<String>) -> GetObjectStream;
    fn stream_get_objects_with_prefix(
        &self,
        bucket: impl Into<String>,
        prefix: impl Into<String>,
    ) -> GetObjectStream;
}

Required Methods§

Source

fn download_to_file<'life0, 'async_trait, F>( &'life0 self, source: GetObjectRequest, target: F, ) -> Pin<Box<dyn Future<Output = S3ExtResult<GetObjectOutput>> + Send + 'async_trait>>
where F: AsRef<Path> + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Get object and write it to file target

Source

fn upload_from_file<'life0, 'async_trait, F>( &'life0 self, source: F, target: PutObjectRequest, ) -> Pin<Box<dyn Future<Output = S3ExtResult<PutObjectOutput>> + Send + 'async_trait>>
where F: AsRef<Path> + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Upload content of file to S3

§Caveats

The current implementation is incomplete. For now, the following limitation applies:

  • The full content of source is copied into memory.
Source

fn upload_from_file_multipart<'life0, 'async_trait, F>( &'life0 self, source: F, target: PutObjectRequest, part_size: usize, ) -> Pin<Box<dyn Future<Output = S3ExtResult<CompleteMultipartUploadOutput>> + Send + 'async_trait>>
where F: AsRef<Path> + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Upload content of file to S3 using multi-part upload

§Caveats

The current implementation is incomplete. For now, the following limitation applies:

  • The full content of a part is copied into memory.
Source

fn download<'life0, 'life1, 'async_trait, W>( &'life0 self, source: GetObjectRequest, target: &'life1 mut W, ) -> Pin<Box<dyn Future<Output = S3ExtResult<GetObjectOutput>> + Send + 'async_trait>>
where W: AsyncWrite + Unpin + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get object and write it to target

Source

fn upload<'life0, 'life1, 'async_trait, R>( &'life0 self, source: &'life1 mut R, target: PutObjectRequest, ) -> Pin<Box<dyn Future<Output = S3ExtResult<PutObjectOutput>> + Send + 'async_trait>>
where R: AsyncRead + Unpin + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Read source and upload it to S3

§Caveats

The current implementation is incomplete. For now, the following limitation applies:

  • The full content of source is copied into memory.
Source

fn upload_multipart<'life0, 'life1, 'async_trait, R>( &'life0 self, source: &'life1 mut R, target: PutObjectRequest, part_size: usize, ) -> Pin<Box<dyn Future<Output = S3ExtResult<CompleteMultipartUploadOutput>> + Send + 'async_trait>>
where R: AsyncRead + Unpin + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Read source and upload it to S3 using multi-part upload

§Caveats

The current implementation is incomplete. For now, the following limitation applies:

  • The full content of a part is copied into memory.
Source

fn stream_objects(&self, bucket: impl Into<String>) -> ObjectStream

Stream over all objects Access to an iterator-like object ObjectIter can be obtained by calling into_iter()

Objects are lexicographically sorted by their key.

Source

fn stream_objects_with_prefix( &self, bucket: impl Into<String>, prefix: impl Into<String>, ) -> ObjectStream

Stream over objects with given prefix

Objects are lexicographically sorted by their key.

Source

fn stream_get_objects(&self, bucket: impl Into<String>) -> GetObjectStream

Stream over all objects; fetching objects as needed

Objects are lexicographically sorted by their key.

Source

fn stream_get_objects_with_prefix( &self, bucket: impl Into<String>, prefix: impl Into<String>, ) -> GetObjectStream

Stream over objects with given prefix; fetching objects as needed

Objects are lexicographically sorted by their key.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl S3Ext for S3Client

Source§

fn download_to_file<'life0, 'async_trait, F>( &'life0 self, source: GetObjectRequest, target: F, ) -> Pin<Box<dyn Future<Output = Result<GetObjectOutput, S3ExtError>> + Send + 'async_trait>>
where F: AsRef<Path> + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Source§

fn upload_from_file<'life0, 'async_trait, F>( &'life0 self, source: F, target: PutObjectRequest, ) -> Pin<Box<dyn Future<Output = S3ExtResult<PutObjectOutput>> + Send + 'async_trait>>
where F: AsRef<Path> + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Source§

fn upload_from_file_multipart<'life0, 'async_trait, F>( &'life0 self, source: F, target: PutObjectRequest, part_size: usize, ) -> Pin<Box<dyn Future<Output = S3ExtResult<CompleteMultipartUploadOutput>> + Send + 'async_trait>>
where F: AsRef<Path> + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Source§

fn download<'life0, 'life1, 'async_trait, W>( &'life0 self, source: GetObjectRequest, target: &'life1 mut W, ) -> Pin<Box<dyn Future<Output = S3ExtResult<GetObjectOutput>> + Send + 'async_trait>>
where W: AsyncWrite + Unpin + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn upload<'life0, 'life1, 'async_trait, R>( &'life0 self, source: &'life1 mut R, target: PutObjectRequest, ) -> Pin<Box<dyn Future<Output = S3ExtResult<PutObjectOutput>> + Send + 'async_trait>>
where R: AsyncRead + Unpin + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn upload_multipart<'life0, 'life1, 'async_trait, R>( &'life0 self, source: &'life1 mut R, target: PutObjectRequest, part_size: usize, ) -> Pin<Box<dyn Future<Output = S3ExtResult<CompleteMultipartUploadOutput>> + Send + 'async_trait>>
where R: AsyncRead + Unpin + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn stream_objects(&self, bucket: impl Into<String>) -> ObjectStream

Source§

fn stream_objects_with_prefix( &self, bucket: impl Into<String>, prefix: impl Into<String>, ) -> ObjectStream

Source§

fn stream_get_objects(&self, bucket: impl Into<String>) -> GetObjectStream

Source§

fn stream_get_objects_with_prefix( &self, bucket: impl Into<String>, prefix: impl Into<String>, ) -> GetObjectStream

Implementors§