pub struct Bucket {
pub namespace: String,
pub name: String,
/* private fields */
}Expand description
Bucket
Fields§
§namespace: StringNamespace
name: StringBucket name
Implementations§
Source§impl Bucket
impl Bucket
Sourcepub async fn put_object<B>(
&self,
object_name: &str,
content: B,
) -> Result<Object>
pub async fn put_object<B>( &self, object_name: &str, content: B, ) -> Result<Object>
Sourcepub async fn put_object_with_checksum(
&self,
object_name: &str,
content: impl AsRef<[u8]>,
algorithm: ChecksumAlgorithm,
) -> Result<Object>
pub async fn put_object_with_checksum( &self, object_name: &str, content: impl AsRef<[u8]>, algorithm: ChecksumAlgorithm, ) -> Result<Object>
Put Object with Checksum
§Arguments
object_name- Object namecontent- Raw object contentalgorithm- Checksum algorithm to use
Sourcepub async fn get_object(&self, object_name: &str) -> Result<Object>
pub async fn get_object(&self, object_name: &str) -> Result<Object>
Get Object
§Arguments
object_name- Object name
Returns the exact object bytes without UTF-8 decoding.
Sourcepub async fn get_or_create_object<B>(
&self,
object_name: &str,
content: B,
) -> Result<Object>
pub async fn get_or_create_object<B>( &self, object_name: &str, content: B, ) -> Result<Object>
Get or Create Object
Tries to get the object. If it doesn’t exist (404), creates it with the provided content.
§Arguments
object_name- Object namecontent- Raw content to use if object needs to be created
Sourcepub async fn delete_object(&self, object_name: &str) -> Result<()>
pub async fn delete_object(&self, object_name: &str) -> Result<()>
Sourcepub async fn get_retention_rules(&self) -> Result<Vec<RetentionRule>>
pub async fn get_retention_rules(&self) -> Result<Vec<RetentionRule>>
Get Retention Rules
Sourcepub async fn create_retention_rule(
&self,
details: RetentionRuleDetails,
) -> Result<RetentionRule>
pub async fn create_retention_rule( &self, details: RetentionRuleDetails, ) -> Result<RetentionRule>
Create Retention Rule
Sourcepub async fn get_retention_rule(&self, rule_id: &str) -> Result<RetentionRule>
pub async fn get_retention_rule(&self, rule_id: &str) -> Result<RetentionRule>
Get Retention Rule
Sourcepub async fn update_retention_rule(
&self,
rule_or_id: impl Into<String>,
details: RetentionRuleDetails,
) -> Result<RetentionRule>
pub async fn update_retention_rule( &self, rule_or_id: impl Into<String>, details: RetentionRuleDetails, ) -> Result<RetentionRule>
Update Retention Rule
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Bucket
impl !UnwindSafe for Bucket
impl Freeze for Bucket
impl Send for Bucket
impl Sync for Bucket
impl Unpin for Bucket
impl UnsafeUnpin for Bucket
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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