Struct oss_rust_sdk::oss::OSS
source · [−]pub struct OSS<'a> { /* private fields */ }Implementations
sourceimpl<'a> OSS<'a>
impl<'a> OSS<'a>
pub fn new<S>(key_id: S, key_secret: S, endpoint: S, bucket: S) -> Self where
S: Into<Cow<'a, str>>,
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: &'a 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 where
S: AsRef<str>,
pub async fn async_get_object<S>(
&self,
object: S,
headers: Option<HashMap<S, S>>,
resources: Option<HashMap<S, Option<S>>>
) -> Result<Bytes, Error> where
S: AsRef<str>,
pub async fn async_put_object_from_buffer<S1, S2, H, R>(
&self,
buf: &[u8],
object: S1,
headers: H,
resources: R
) -> Result<Bytes, Error> where
S1: AsRef<str>,
S2: AsRef<str>,
H: Into<Option<HashMap<S2, S2>>>,
R: Into<Option<HashMap<S2, Option<S2>>>>,
Trait Implementations
sourceimpl<'a> ObjectAPI for OSS<'a>
impl<'a> ObjectAPI for OSS<'a>
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,
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 delete_object<S>(&self, object_name: S) -> Result<(), Error> where
S: AsRef<str>,
sourceimpl<'a> ServiceAPI for OSS<'a>
impl<'a> ServiceAPI for OSS<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for OSS<'a>
impl<'a> Send for OSS<'a>
impl<'a> Sync for OSS<'a>
impl<'a> Unpin for OSS<'a>
impl<'a> UnwindSafe for OSS<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more