Trait ObjectAPI

Source
pub trait ObjectAPI {
    // Required methods
    fn list_object<S, H, R>(
        &self,
        headers: H,
        resources: R,
    ) -> Result<ListObjects, Error>
       where S: AsRef<str>,
             H: Into<Option<HashMap<S, S>>>,
             R: Into<Option<HashMap<S, Option<S>>>>;
    fn get_object<S1, S2, H, R>(
        &self,
        object_name: S1,
        headers: H,
        resources: R,
    ) -> Result<Vec<u8>, Error>
       where S1: AsRef<str>,
             S2: AsRef<str>,
             H: Into<Option<HashMap<S2, S2>>>,
             R: Into<Option<HashMap<S2, Option<S2>>>>;
    fn get_object_acl<S>(&self, object_name: S) -> Result<String, Error>
       where S: AsRef<str>;
    fn put_object_from_file<S1, S2, S3, H, R>(
        &self,
        file: S1,
        object_name: S2,
        headers: H,
        resources: R,
    ) -> Result<(), Error>
       where S1: AsRef<str>,
             S2: AsRef<str>,
             S3: AsRef<str>,
             H: Into<Option<HashMap<S3, S3>>>,
             R: Into<Option<HashMap<S3, Option<S3>>>>;
    fn put_object_from_buffer<S1, S2, H, R>(
        &self,
        buf: &[u8],
        object_name: S1,
        headers: H,
        resources: R,
    ) -> Result<(), Error>
       where S1: AsRef<str>,
             S2: AsRef<str>,
             H: Into<Option<HashMap<S2, S2>>>,
             R: Into<Option<HashMap<S2, Option<S2>>>>;
    fn get_object_signed_url<S1>(
        &self,
        object_name: S1,
        expires: usize,
    ) -> String
       where S1: AsRef<str> + Send;
    fn copy_object_from_object<S1, S2, S3, H, R>(
        &self,
        src: S1,
        dest: S2,
        headers: H,
        resources: R,
    ) -> Result<(), Error>
       where S1: AsRef<str>,
             S2: AsRef<str>,
             S3: AsRef<str>,
             H: Into<Option<HashMap<S3, S3>>>,
             R: Into<Option<HashMap<S3, Option<S3>>>>;
    fn delete_object<S>(&self, object_name: S) -> Result<(), Error>
       where S: AsRef<str>;
}

Required Methods§

Source

fn list_object<S, H, R>( &self, headers: H, resources: R, ) -> Result<ListObjects, Error>
where S: AsRef<str>, H: Into<Option<HashMap<S, S>>>, R: Into<Option<HashMap<S, Option<S>>>>,

Source

fn get_object<S1, S2, H, R>( &self, object_name: S1, headers: H, resources: R, ) -> Result<Vec<u8>, Error>
where S1: AsRef<str>, S2: AsRef<str>, H: Into<Option<HashMap<S2, S2>>>, R: Into<Option<HashMap<S2, Option<S2>>>>,

Source

fn get_object_acl<S>(&self, object_name: S) -> Result<String, Error>
where S: AsRef<str>,

Source

fn put_object_from_file<S1, S2, S3, H, R>( &self, file: S1, object_name: S2, headers: H, resources: R, ) -> Result<(), Error>
where S1: AsRef<str>, S2: AsRef<str>, S3: AsRef<str>, H: Into<Option<HashMap<S3, S3>>>, R: Into<Option<HashMap<S3, Option<S3>>>>,

Source

fn put_object_from_buffer<S1, S2, H, R>( &self, buf: &[u8], object_name: S1, headers: H, resources: R, ) -> Result<(), Error>
where S1: AsRef<str>, S2: AsRef<str>, H: Into<Option<HashMap<S2, S2>>>, R: Into<Option<HashMap<S2, Option<S2>>>>,

Source

fn get_object_signed_url<S1>(&self, object_name: S1, expires: usize) -> String
where S1: AsRef<str> + Send,

Source

fn copy_object_from_object<S1, S2, S3, H, R>( &self, src: S1, dest: S2, headers: H, resources: R, ) -> Result<(), Error>
where S1: AsRef<str>, S2: AsRef<str>, S3: AsRef<str>, H: Into<Option<HashMap<S3, S3>>>, R: Into<Option<HashMap<S3, Option<S3>>>>,

Source

fn delete_object<S>(&self, object_name: S) -> Result<(), Error>
where S: AsRef<str>,

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> ObjectAPI for OSS<'a>