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 get_object(&self, object_name: &str) -> Result<Object>
pub async fn get_object(&self, object_name: &str) -> Result<Object>
Sourcepub async fn get_or_create_object(
&self,
object_name: &str,
content: &str,
) -> Result<Object>
pub async fn get_or_create_object( &self, object_name: &str, content: &str, ) -> 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- Content to use if object needs to be created
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_id: &str,
details: RetentionRuleDetails,
) -> Result<RetentionRule>
pub async fn update_retention_rule( &self, rule_id: &str, details: RetentionRuleDetails, ) -> Result<RetentionRule>
Update Retention Rule
Sourcepub async fn delete_retention_rule(&self, rule_id: &str) -> Result<()>
pub async fn delete_retention_rule(&self, rule_id: &str) -> Result<()>
Delete Retention Rule
Trait Implementations§
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> 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