pub struct OSS {
pub client: Client,
/* private fields */
}
Fields§
§client: Client
Implementations§
Source§impl OSS
impl OSS
pub fn new( key_id: String, key_secret: String, endpoint: String, bucket: String, ) -> Self
pub fn bucket(&self) -> &str
pub fn endpoint(&self) -> &str
pub fn key_id(&self) -> &str
pub fn key_secret(&self) -> &str
pub fn set_bucket(&mut self, bucket: &str)
pub fn host(&self, bucket: &str, object: &str, resources_str: &str) -> String
pub fn date(&self) -> String
pub fn get_resources_str<S>(&self, params: HashMap<S, Option<S>>) -> String
pub async fn list_bucket<S, R>( &self, resources: R, ) -> Result<ListBuckets, Error>
pub async fn get_object<S>( &self, object: S, headers: Option<HashMap<S, S>>, resources: Option<HashMap<S, Option<S>>>, ) -> Result<Bytes, Error>
pub async fn head_object<S>( &self, object: S, headers: Option<HashMap<S, S>>, resources: Option<HashMap<S, Option<S>>>, ) -> Result<HeaderMap, Error>
pub async fn put_object_from_buffer<S1, S2, H, R>( &self, buf: &[u8], object: S1, headers: H, resources: R, ) -> Result<Bytes, Error>
pub async fn put_object_from_file<S1, S2, S3, H, R>( &self, file: S1, object_name: S2, headers: H, resources: R, ) -> Result<(), Error>
pub async fn chunk_upload_by_size<S1, H>( &self, object_name: S1, file: S1, chunk_size: u64, headers: H, ) -> Result<(), Error>
pub async fn delete_object<S>(&self, object_name: S) -> Result<(), Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OSS
impl !RefUnwindSafe for OSS
impl Send for OSS
impl Sync for OSS
impl Unpin for OSS
impl !UnwindSafe for OSS
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more