pub struct S3Client { /* private fields */ }Implementations§
Source§impl S3Client
impl S3Client
Sourcepub async fn create_bucket(&self, bucket_name: &str) -> Result<BucketInfo>
pub async fn create_bucket(&self, bucket_name: &str) -> Result<BucketInfo>
Create a bucket.
Sourcepub async fn delete_bucket(&self, bucket_name: &str) -> Result<()>
pub async fn delete_bucket(&self, bucket_name: &str) -> Result<()>
Delete a bucket.
Sourcepub async fn list_buckets(&self) -> Result<Vec<BucketInfo>>
pub async fn list_buckets(&self) -> Result<Vec<BucketInfo>>
List all accessible buckets.
Sourcepub async fn list_objects_v2(
&self,
bucket_name: &str,
options: ListObjectsOptions,
) -> Result<ListObjectsResult>
pub async fn list_objects_v2( &self, bucket_name: &str, options: ListObjectsOptions, ) -> Result<ListObjectsResult>
List objects in a bucket with optional pagination/filtering.
Sourcepub async fn upload_file(
&self,
local_path: &str,
bucket_name: &str,
object_key: &str,
options: UploadFileOptions,
) -> Result<UploadResult>
pub async fn upload_file( &self, local_path: &str, bucket_name: &str, object_key: &str, options: UploadFileOptions, ) -> Result<UploadResult>
Upload a local file to S3.
Sourcepub async fn get_object(
&self,
bucket_name: &str,
object_key: &str,
options: GetObjectOptions,
) -> Result<GetObjectResult>
pub async fn get_object( &self, bucket_name: &str, object_key: &str, options: GetObjectOptions, ) -> Result<GetObjectResult>
Fetch object content and metadata from S3.
Sourcepub async fn download_object_to_file(
&self,
bucket_name: &str,
object_key: &str,
local_path: &str,
options: GetObjectOptions,
) -> Result<(u64, String)>
pub async fn download_object_to_file( &self, bucket_name: &str, object_key: &str, local_path: &str, options: GetObjectOptions, ) -> Result<(u64, String)>
Download an S3 object directly to a local file path.
Sourcepub async fn health_check(&self) -> Result<()>
pub async fn health_check(&self) -> Result<()>
Verify S3 connectivity by performing a lightweight list-buckets call.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for S3Client
impl !RefUnwindSafe for S3Client
impl Send for S3Client
impl Sync for S3Client
impl Unpin for S3Client
impl UnsafeUnpin for S3Client
impl !UnwindSafe for S3Client
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.