aliyun_oss_rs/bucket/
del_bucket_logging.rs1use crate::{
2 Error,
3 error::normal_error,
4 request::{Oss, OssRequest},
5};
6use http::Method;
7
8pub struct DelBucketLogging {
12 req: OssRequest,
13}
14impl DelBucketLogging {
15 pub(super) fn new(oss: Oss) -> Self {
16 let mut req = OssRequest::new(oss, Method::DELETE);
17 req.insert_query("logging", "");
18 DelBucketLogging { req }
19 }
20 pub async fn send(self) -> Result<(), Error> {
22 let response = self.req.send_to_oss()?.await?;
23 let status_code = response.status();
24 match status_code {
25 code if code.is_success() => Ok(()),
26 _ => Err(normal_error(response).await),
27 }
28 }
29}