File tree 1 file changed +20
-1
lines changed
1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,26 @@ use crate::s3::builders::BucketExists;
20
20
use std:: sync:: Arc ;
21
21
22
22
impl Client {
23
- /// Create a BucketExists request builder.
23
+ /// Creates a [`BucketExists`](crate::s3::builders::BucketExists) request builder.
24
+ ///
25
+ /// To execute the request, call [`BucketExists::send`](crate::s3::types::S3Api::send),
26
+ /// which returns a [`Result`] containing a [`BucketExistsResponse`](crate::s3::response::BucketExistsResponse).
27
+ ///
28
+ /// # Examples
29
+ ///
30
+ /// ```no_run
31
+ /// use minio::s3::Client;
32
+ /// use minio::s3::response::BucketExistsResponse;
33
+ /// use minio::s3::types::S3Api;
34
+ /// use std::sync::Arc;
35
+ ///
36
+ /// #[tokio::main]
37
+ /// async fn main() {
38
+ /// let client: Arc<Client> = Arc::new(Default::default()); // configure your client here
39
+ /// let resp: BucketExistsResponse = client.bucket_exists("bucket-name").send().await.unwrap();
40
+ /// println!("bucket '{}' exists: {}", resp.bucket, resp.exists);
41
+ /// }
42
+ /// ```
24
43
pub fn bucket_exists ( self : & Arc < Self > , bucket : & str ) -> BucketExists {
25
44
BucketExists :: new ( self , bucket)
26
45
}
You can’t perform that action at this time.
0 commit comments