Skip to content

Commit 99b0360

Browse files
committed
doc update
1 parent a00f75d commit 99b0360

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

src/s3/client/bucket_exists.rs

+20-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,26 @@ use crate::s3::builders::BucketExists;
2020
use std::sync::Arc;
2121

2222
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+
/// ```
2443
pub fn bucket_exists(self: &Arc<Self>, bucket: &str) -> BucketExists {
2544
BucketExists::new(self, bucket)
2645
}

0 commit comments

Comments
 (0)