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 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>;
}