Trait AsyncObjectAPI

Source
pub trait AsyncObjectAPI {
    // Required methods
    fn list_object<'life0, 'async_trait, S, H, R>(
        &'life0 self,
        headers: H,
        resources: R,
    ) -> Pin<Box<dyn Future<Output = Result<ListObjects, Error>> + Send + 'async_trait>>
       where S: AsRef<str> + 'async_trait,
             H: Into<Option<HashMap<S, S>>> + Send + 'async_trait,
             R: Into<Option<HashMap<S, Option<S>>>> + Send + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn get_object<'life0, 'async_trait, S1, S2, H, R>(
        &'life0 self,
        object_name: S1,
        headers: H,
        resources: R,
    ) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'async_trait>>
       where S1: AsRef<str> + Send + 'async_trait,
             S2: AsRef<str> + Send + 'async_trait,
             H: Into<Option<HashMap<S2, S2>>> + Send + 'async_trait,
             R: Into<Option<HashMap<S2, Option<S2>>>> + Send + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn put_object<'life0, 'life1, 'async_trait, S1, S2, H, R>(
        &'life0 self,
        buf: &'life1 [u8],
        object_name: S1,
        headers: H,
        resources: R,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where S1: AsRef<str> + Send + 'async_trait,
             S2: AsRef<str> + Send + 'async_trait,
             H: Into<Option<HashMap<S2, S2>>> + Send + 'async_trait,
             R: Into<Option<HashMap<S2, Option<S2>>>> + Send + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn copy_object_from_object<'life0, 'async_trait, S1, S2, S3, H, R>(
        &'life0 self,
        src: S1,
        dest: S2,
        headers: H,
        resources: R,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where S1: AsRef<str> + Send + 'async_trait,
             S2: AsRef<str> + Send + 'async_trait,
             S3: AsRef<str> + Send + 'async_trait,
             H: Into<Option<HashMap<S3, S3>>> + Send + 'async_trait,
             R: Into<Option<HashMap<S3, Option<S3>>>> + Send + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn delete_object<'life0, 'async_trait, S>(
        &'life0 self,
        object_name: S,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where S: AsRef<str> + Send + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn head_object<'life0, 'async_trait, S>(
        &'life0 self,
        object_name: S,
    ) -> Pin<Box<dyn Future<Output = Result<ObjectMeta, Error>> + Send + 'async_trait>>
       where S: AsRef<str> + Send + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn init_multi<'life0, 'async_trait, S1, S2, H, R>(
        &'life0 self,
        object_name: S1,
        headers: H,
        resources: R,
    ) -> Pin<Box<dyn Future<Output = Result<InitiateMultipartUploadResult, Error>> + Send + 'async_trait>>
       where S1: AsRef<str> + Send + 'async_trait,
             S2: AsRef<str> + Send + 'async_trait,
             H: Into<Option<HashMap<S2, S2>>> + Send + 'async_trait,
             R: Into<Option<HashMap<S2, Option<S2>>>> + Send + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn upload_part<'life0, 'life1, 'async_trait, S1, S2, H, R>(
        &'life0 self,
        buf: &'life1 [u8],
        object_name: S1,
        headers: H,
        resources: R,
    ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>
       where S1: AsRef<str> + Send + 'async_trait,
             S2: AsRef<str> + Send + 'async_trait,
             H: Into<Option<HashMap<S2, S2>>> + Send + 'async_trait,
             R: Into<Option<HashMap<S2, Option<S2>>>> + Send + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn complete_multi<'life0, 'async_trait, S1, S2, H, R>(
        &'life0 self,
        body: String,
        object_name: S1,
        headers: H,
        resources: R,
    ) -> Pin<Box<dyn Future<Output = Result<CompleteMultipartUploadResult, Error>> + Send + 'async_trait>>
       where S1: AsRef<str> + Send + 'async_trait,
             S2: AsRef<str> + Send + 'async_trait,
             H: Into<Option<HashMap<S2, S2>>> + Send + 'async_trait,
             R: Into<Option<HashMap<S2, Option<S2>>>> + Send + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn abort_multi<'life0, 'async_trait, S1, S2, H, R>(
        &'life0 self,
        object_name: S1,
        headers: H,
        resources: R,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where S1: AsRef<str> + Send + 'async_trait,
             S2: AsRef<str> + Send + 'async_trait,
             H: Into<Option<HashMap<S2, S2>>> + Send + 'async_trait,
             R: Into<Option<HashMap<S2, Option<S2>>>> + Send + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn list_object<'life0, 'async_trait, S, H, R>( &'life0 self, headers: H, resources: R, ) -> Pin<Box<dyn Future<Output = Result<ListObjects, Error>> + Send + 'async_trait>>
where S: AsRef<str> + 'async_trait, H: Into<Option<HashMap<S, S>>> + Send + 'async_trait, R: Into<Option<HashMap<S, Option<S>>>> + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_object<'life0, 'async_trait, S1, S2, H, R>( &'life0 self, object_name: S1, headers: H, resources: R, ) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'async_trait>>
where S1: AsRef<str> + Send + 'async_trait, S2: AsRef<str> + Send + 'async_trait, H: Into<Option<HashMap<S2, S2>>> + Send + 'async_trait, R: Into<Option<HashMap<S2, Option<S2>>>> + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Source

fn put_object<'life0, 'life1, 'async_trait, S1, S2, H, R>( &'life0 self, buf: &'life1 [u8], object_name: S1, headers: H, resources: R, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where S1: AsRef<str> + Send + 'async_trait, S2: AsRef<str> + Send + 'async_trait, H: Into<Option<HashMap<S2, S2>>> + Send + 'async_trait, R: Into<Option<HashMap<S2, Option<S2>>>> + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn copy_object_from_object<'life0, 'async_trait, S1, S2, S3, H, R>( &'life0 self, src: S1, dest: S2, headers: H, resources: R, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where S1: AsRef<str> + Send + 'async_trait, S2: AsRef<str> + Send + 'async_trait, S3: AsRef<str> + Send + 'async_trait, H: Into<Option<HashMap<S3, S3>>> + Send + 'async_trait, R: Into<Option<HashMap<S3, Option<S3>>>> + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Source

fn delete_object<'life0, 'async_trait, S>( &'life0 self, object_name: S, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where S: AsRef<str> + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Source

fn head_object<'life0, 'async_trait, S>( &'life0 self, object_name: S, ) -> Pin<Box<dyn Future<Output = Result<ObjectMeta, Error>> + Send + 'async_trait>>
where S: AsRef<str> + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Source

fn init_multi<'life0, 'async_trait, S1, S2, H, R>( &'life0 self, object_name: S1, headers: H, resources: R, ) -> Pin<Box<dyn Future<Output = Result<InitiateMultipartUploadResult, Error>> + Send + 'async_trait>>
where S1: AsRef<str> + Send + 'async_trait, S2: AsRef<str> + Send + 'async_trait, H: Into<Option<HashMap<S2, S2>>> + Send + 'async_trait, R: Into<Option<HashMap<S2, Option<S2>>>> + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Notify oss to init a Multipart Upload event

Source

fn upload_part<'life0, 'life1, 'async_trait, S1, S2, H, R>( &'life0 self, buf: &'life1 [u8], object_name: S1, headers: H, resources: R, ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>
where S1: AsRef<str> + Send + 'async_trait, S2: AsRef<str> + Send + 'async_trait, H: Into<Option<HashMap<S2, S2>>> + Send + 'async_trait, R: Into<Option<HashMap<S2, Option<S2>>>> + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Upload data in chunks according to the specified Object name and uploadId

Source

fn complete_multi<'life0, 'async_trait, S1, S2, H, R>( &'life0 self, body: String, object_name: S1, headers: H, resources: R, ) -> Pin<Box<dyn Future<Output = Result<CompleteMultipartUploadResult, Error>> + Send + 'async_trait>>
where S1: AsRef<str> + Send + 'async_trait, S2: AsRef<str> + Send + 'async_trait, H: Into<Option<HashMap<S2, S2>>> + Send + 'async_trait, R: Into<Option<HashMap<S2, Option<S2>>>> + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Complete the multipart upload of the entire file

body format PartNumber ETag

§Examples

#[derive(Debug, Default, Serialize, Deserialize, PartialEq)] #[serde(rename_all = “PascalCase”)] pub struct PartWrapper { pub part: Vec, }

#[derive(Debug, Serialize, Deserialize, PartialEq)] #[serde(rename_all = “PascalCase”)] pub struct Part { part_number: usize, e_tag: String, }

let parts = CompleteDTO { part: vec![Part { part_number: 1, e_tag: “50BE5FACC702C5B945588031C6*****”.to_string(), }], };

let body = quick_xml::se::to_string_with_root(“CompleteMultipartUpload”, &parts).unwrap();

Source

fn abort_multi<'life0, 'async_trait, S1, S2, H, R>( &'life0 self, object_name: S1, headers: H, resources: R, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where S1: AsRef<str> + Send + 'async_trait, S2: AsRef<str> + Send + 'async_trait, H: Into<Option<HashMap<S2, S2>>> + Send + 'async_trait, R: Into<Option<HashMap<S2, Option<S2>>>> + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Cancel the MultipartUpload event and delete the corresponding Part data

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.

Implementors§

Source§

impl<'a> AsyncObjectAPI for OSS<'a>