Bucket

Struct Bucket 

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

Instantiate an Bucket which wrap Minio and BucketArgs. Provides operations on objects.

Implementations§

Source§

impl Bucket

Source

pub fn bucket_args(&self) -> BucketArgs

Source

pub async fn exists(&self) -> Result<bool>

Check if exists. If exists and you have permission to access it, return [Ok(true)], otherwise [Ok(false)]

Source

pub async fn list_objects( &self, args: ListObjectsArgs, ) -> Result<ListBucketResult>

Source

pub async fn get_acl(&self) -> Result<AccessControlPolicy>

Source

pub async fn get_region(&self) -> Result<String>

Source

pub async fn get_cors(&self) -> Result<CORSConfiguration>

Source

pub async fn set_cors(&self, args: CORSConfiguration) -> Result<()>

Source

pub async fn del_cors(&self) -> Result<()>

Source

pub async fn get_encryption(&self) -> Result<ServerSideEncryptionConfiguration>

Source

pub async fn set_encryption( &self, args: ServerSideEncryptionConfiguration, ) -> Result<()>

Source

pub async fn del_encryption(&self) -> Result<()>

Source

pub async fn get_public_access_block( &self, ) -> Result<PublicAccessBlockConfiguration>

Source

pub async fn set_public_access_block( &self, args: PublicAccessBlockConfiguration, ) -> Result<()>

Source

pub async fn del_public_access_block(&self) -> Result<()>

Source

pub async fn get_tags(&self) -> Result<Option<Tags>>

Source

pub async fn set_tags(&self, args: Tags) -> Result<()>

Source

pub async fn del_tags(&self) -> Result<()>

Source

pub async fn del_object_lock_config(&self) -> Result<()>

Source

pub async fn get_object_lock_config(&self) -> Result<ObjectLockConfig>

Source

pub async fn set_object_lock_config(&self, args: ObjectLockConfig) -> Result<()>

Source

pub async fn get_object<K>(&self, key: K) -> Result<Response>
where K: Into<KeyArgs>,

Source

pub async fn get_object_torrent<K>(&self, key: K) -> Result<Response>
where K: Into<KeyArgs>,

Source

pub async fn put_object<K>(&self, key: K, data: Bytes) -> Result<()>
where K: Into<KeyArgs>,

Source

pub async fn put_object_stream<K>( &self, key: K, stream: Pin<Box<dyn Stream<Item = Result<Bytes>> + Sync + Send>>, len: Option<usize>, ) -> Result<()>
where K: Into<KeyArgs>,

Source

pub async fn copy_object<K>(&self, key: K, cp: CopySource) -> Result<()>
where K: Into<KeyArgs>,

Source

pub async fn remove_object<K>(&self, key: K) -> Result<()>
where K: Into<KeyArgs>,

Source

pub async fn stat_object<K>(&self, key: K) -> Result<Option<ObjectStat>>
where K: Into<KeyArgs>,

Source

pub async fn get_object_tags<K>(&self, key: K) -> Result<Tags>
where K: Into<KeyArgs>,

Source

pub async fn set_object_tags<K>(&self, key: K, tags: Tags) -> Result<()>
where K: Into<KeyArgs>,

Source

pub async fn del_object_tags<K>(&self, key: K) -> Result<()>
where K: Into<KeyArgs>,

Source

pub async fn get_object_retention<K>(&self, key: K) -> Result<Retention>
where K: Into<KeyArgs>,

Source

pub async fn set_object_retention<K>( &self, key: K, retention: Retention, ) -> Result<()>
where K: Into<KeyArgs>,

Source

pub async fn select_object_content<K>( &self, key: K, request: SelectRequest, ) -> Result<SelectObjectReader>
where K: Into<KeyArgs>,

Source

pub async fn get_object_acl<K>(&self, key: K) -> Result<AccessControlPolicy>
where K: Into<KeyArgs>,

Trait Implementations§

Source§

impl Clone for Bucket

Source§

fn clone(&self) -> Bucket

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 Into<BucketArgs> for &Bucket

Source§

fn into(self) -> BucketArgs

Converts this type into the (usually inferred) input type.
Source§

impl Into<BucketArgs> for Bucket

Source§

fn into(self) -> BucketArgs

Converts this type into the (usually inferred) input type.

Auto Trait Implementations§

§

impl Freeze for Bucket

§

impl !RefUnwindSafe for Bucket

§

impl Send for Bucket

§

impl Sync for Bucket

§

impl Unpin for Bucket

§

impl !UnwindSafe for Bucket

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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
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
Source§

impl<T> ErasedDestructor for T
where T: 'static,