OssObject

Struct OssObject 

Source
pub struct OssObject { /* private fields */ }
Expand description

OSS object implementing APIs such as uploading and deleting files

Implementations§

Source§

impl OssObject

Source

pub fn with_security_token(self, token: impl Into<String>) -> Self

Attach a temporary security token for STS authentication

Source

pub fn set_security_token(&mut self, token: impl Into<String>)

Update the security token in place for reuse

Source

pub fn put_object(&self) -> PutObject

Upload a file to OSS

Source

pub fn append_object(&self) -> AppendObject

Append to a file

Source

pub fn del_object(&self) -> DelObject

Delete a file

Source

pub fn get_object_url(&self) -> GetObjectUrl

Get the object’s access URL

Source

pub fn get_object_tagging(&self) -> GetObjectTagging

Get the object’s tag information

Source

pub fn head_object(&self) -> HeadObject

Get the object’s full metadata

Source

pub fn get_object_meta(&self) -> GetObjectMeta

Get the object’s meta information

Source

pub fn get_object_acl(&self) -> GetObjectAcl

Get the object’s ACL

Source

pub fn get_object(&self) -> GetObject

Get the object’s content

Source

pub fn select_object(&self) -> SelectObject

Query the object’s content using OSS Select

Source

pub fn copy_object(&self, copy_source: &str) -> CopyObject

Copy the object

Source

pub fn restore_object(&self) -> RestoreObject

Restore the object

Source

pub fn put_object_acl(&self, acl: Acl) -> PutObjectAcl

Set the object’s ACL

Source

pub fn put_object_tagging( &self, tags: Vec<(impl ToString, impl ToString)>, ) -> PutObjectTagging

Set the object’s tags

Create a symlink

Get the symlink

Source

pub fn del_object_tagging(&self) -> DelObjectTagging

Remove all tags from the object

Source

pub fn multipart_init_upload(&self) -> InitUpload

Initialize a multipart upload

Source

pub fn multipart_upload_part( &self, part_number: u32, upload_id: impl ToString, ) -> UploadPart

Upload a part

Source

pub fn multipart_copy_part( &self, part_number: u32, upload_id: impl ToString, copy_source: impl ToString, ) -> CopyToPart

Copy object content to a part

Source

pub fn multipart_complete_upload( &self, upload_id: impl ToString, ) -> CompleteUpload<'_>

Complete the multipart upload

Source

pub fn multipart_abort_upload(&self, upload_id: impl ToString) -> AbortUpload

Abort the multipart upload

Source

pub fn multipart_list_parts(&self, upload_id: impl ToString) -> ListParts

List all successfully uploaded parts for the specified Upload ID

Trait Implementations§

Source§

impl Clone for OssObject

Source§

fn clone(&self) -> OssObject

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OssObject

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more