MCPcopy Create free account
hub / github.com/cosdata/cosdata / delete_object

Method delete_object

org/src/s3_client.rs:136–152  ·  view source on GitHub ↗
(&self, key: &str)

Source from the content-addressed store, hash-verified

134 }
135
136 fn delete_object(&self, key: &str) -> Result<(), Box<dyn Error>> {
137 let rt = tokio::runtime::Builder::new_current_thread()
138 .enable_all()
139 .build()?;
140
141 rt.block_on(async {
142 self.client
143 .delete_object()
144 .bucket(&self.bucket)
145 .key(key)
146 .send()
147 .await?;
148
149 println!("Deleted s3://{}/{}", self.bucket, key);
150 Ok(())
151 })
152 }
153}
154
155// More efficient version using a shared runtime

Callers

nothing calls this directly

Calls 1

keyMethod · 0.45

Tested by

no test coverage detected