Objects

Trait Objects 

Source
pub trait Objects {
    // Required methods
    fn put_object<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        content_type: Mime,
        key: &'life1 str,
        data: Vec<u8>,
        acl_header: Option<&'life2 AclHeader>,
    ) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn put_big_object<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
        &'life0 self,
        file_path: &'life1 str,
        key: &'life2 str,
        content_type: Mime,
        storage_class: &'life3 str,
        acl_header: Option<&'life4 AclHeader>,
        part_size: u64,
    ) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait;
    fn head_object<'life0, 'life1, 'async_trait>(
        &'life0 self,
        key: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn delete_object<'life0, 'life1, 'async_trait>(
        &'life0 self,
        key: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_object_binary<'life0, 'life1, 'async_trait>(
        &'life0 self,
        key: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_object<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        key: &'life1 str,
        file_name: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn put_object_get_upload_id<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
        &'life0 self,
        key: &'life1 str,
        content_type: &'life2 Mime,
        storage_class: &'life3 str,
        acl_header: Option<&'life4 AclHeader>,
    ) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait;
    fn put_object_part<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
        &'life0 self,
        key: &'life1 str,
        upload_id: &'life2 str,
        part_number: u64,
        body: Vec<u8>,
        content_type: &'life3 Mime,
        acl_header: Option<&'life4 AclHeader>,
    ) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait;
    fn put_object_complete_part<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        key: &'life1 str,
        etag_map: &'life2 HashMap<u64, String>,
        upload_id: &'life3 str,
    ) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn abort_object_part<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        key: &'life1 str,
        upload_id: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}

Required Methods§

Source

fn put_object<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, content_type: Mime, key: &'life1 str, data: Vec<u8>, acl_header: Option<&'life2 AclHeader>, ) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

上传本地小文件

Source

fn put_big_object<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, file_path: &'life1 str, key: &'life2 str, content_type: Mime, storage_class: &'life3 str, acl_header: Option<&'life4 AclHeader>, part_size: u64, ) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

上传本地大文件

Source

fn head_object<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 str, ) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

判断文件是否存在

Source

fn delete_object<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 str, ) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

删除文件

Source

fn get_object_binary<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 str, ) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

获取文件二进制流

Source

fn get_object<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, key: &'life1 str, file_name: &'life2 str, ) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

下载文件到本地

Source

fn put_object_get_upload_id<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, key: &'life1 str, content_type: &'life2 Mime, storage_class: &'life3 str, acl_header: Option<&'life4 AclHeader>, ) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

获取分块上传的upload_id

Source

fn put_object_part<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, key: &'life1 str, upload_id: &'life2 str, part_number: u64, body: Vec<u8>, content_type: &'life3 Mime, acl_header: Option<&'life4 AclHeader>, ) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

分块上传

Source

fn put_object_complete_part<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, key: &'life1 str, etag_map: &'life2 HashMap<u64, String>, upload_id: &'life3 str, ) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

完成分块上传

Source

fn abort_object_part<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, key: &'life1 str, upload_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Abort Multipart Upload 用来实现舍弃一个分块上传并删除已上传的块。 当您调用 Abort Multipart Upload 时,如果有正在使用这个 Upload Parts 上传块的请求, 则 Upload Parts 会返回失败。当该 UploadId 不存在时,会返回404 NoSuchUpload。

Implementors§