Struct huaweicloud_sdk_rust_obs::client::Client
source · pub struct Client { /* private fields */ }
Implementations§
source§impl Client
impl Client
sourcepub fn new<S: ToString>(
access_key_id: S,
secret_access_key: S,
endpoint: &str
) -> Result<Client, ObsError>
pub fn new<S: ToString>( access_key_id: S, secret_access_key: S, endpoint: &str ) -> Result<Client, ObsError>
endpoint 格式: https[http]://obs.cn-north-4.myhuaweicloud.com
pub fn security(&self) -> Option<SecurityHolder>
pub fn bucket<'a>(&'a self, name: &'a str) -> Bucket<'_>
pub fn builder() -> ClientBuilder
pub fn config(&self) -> &Config
pub async fn do_action<T>( &self, method: Method, bucket_name: &str, uri: &str, with_headers: Option<HeaderMap>, body: Option<T> ) -> Result<Response, ObsError>where T: Into<Body>,
pub async fn do_action_without_bucket_name<T>( &self, method: Method, uri: &str, with_headers: Option<HeaderMap>, body: Option<T> ) -> Result<Response, ObsError>where T: Into<Body>,
Trait Implementations§
source§impl Authorization for Client
impl Authorization for Client
fn signature( &self, method: &str, _params: HashMap<String, String>, headers: HashMap<String, Vec<String>>, canonicalized_url: String ) -> Result<String, ObsError>
fn auth( &self, method: &str, bucket: &str, params: HashMap<String, String>, headers: HashMap<String, Vec<String>>, canonicalized_url: String ) -> Result<HeaderMap, ObsError>
source§impl BucketTrait for Client
impl BucketTrait for Client
fn list_buckets<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<ListAllMyBuckets, ObsError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn create_bucket<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, name: &'life1 str, location: Option<&'life2 str> ) -> Pin<Box<dyn Future<Output = Result<(), ObsError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
fn list_objects<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, name: &'life1 str, prefix: Option<&'life2 str>, marker: Option<&'life3 str>, max_keys: Option<usize> ) -> Pin<Box<dyn Future<Output = Result<ListBucketResult, ObsError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,
source§impl ObjectTrait for Client
impl ObjectTrait for Client
source§fn put_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
bucket: &'life1 str,
key: &'life2 str,
object: &'static [u8]
) -> Pin<Box<dyn Future<Output = Result<(), ObsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn put_object<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, bucket: &'life1 str, key: &'life2 str, object: &'static [u8] ) -> Pin<Box<dyn Future<Output = Result<(), ObsError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
PUT上传
source§fn copy_object<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
bucket: &'life1 str,
src: &'life2 str,
dest: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<CopyObjectResult, ObsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn copy_object<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, bucket: &'life1 str, src: &'life2 str, dest: &'life3 str ) -> Pin<Box<dyn Future<Output = Result<CopyObjectResult, ObsError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,
复制对象
source§fn delete_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
bucket: &'life1 str,
key: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<(), ObsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_object<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, bucket: &'life1 str, key: &'life2 str ) -> Pin<Box<dyn Future<Output = Result<(), ObsError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
删除对象
source§fn get_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
bucket: &'life1 str,
key: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<Bytes, ObsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_object<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, bucket: &'life1 str, key: &'life2 str ) -> Pin<Box<dyn Future<Output = Result<Bytes, ObsError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
获取对象内容
source§fn get_object_metadata<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
bucket: &'life1 str,
key: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<ObjectMeta, ObsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_object_metadata<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, bucket: &'life1 str, key: &'life2 str ) -> Pin<Box<dyn Future<Output = Result<ObjectMeta, ObsError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
获取对象元数据
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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