pub struct BucketClient { /* private fields */ }Expand description
Implementations§
Source§impl BucketClient
impl BucketClient
pub async fn list_objects( &self, prefix: Option<&str>, ) -> Result<Vec<ObjectInfo>>
Sourcepub async fn upload_bytes(
&self,
key: &str,
data: Bytes,
content_type: Option<&str>,
) -> Result<()>
pub async fn upload_bytes( &self, key: &str, data: Bytes, content_type: Option<&str>, ) -> Result<()>
Upload raw bytes as an object.
Sourcepub async fn upload_local_file<P: AsRef<Path>>(
&self,
key: &str,
local_path: P,
content_type: Option<&str>,
) -> Result<u64>
pub async fn upload_local_file<P: AsRef<Path>>( &self, key: &str, local_path: P, content_type: Option<&str>, ) -> Result<u64>
Upload a local file to S3, returning uploaded bytes length.
Sourcepub async fn upload_file(
&self,
key: &str,
data: Bytes,
content_type: Option<&str>,
) -> Result<()>
pub async fn upload_file( &self, key: &str, data: Bytes, content_type: Option<&str>, ) -> Result<()>
Backward-compatible alias. Prefer BucketClient::upload_bytes.
pub async fn download_object(&self, key: &str) -> Result<Bytes>
pub async fn delete_object(&self, key: &str) -> Result<()>
Trait Implementations§
Source§impl Clone for BucketClient
impl Clone for BucketClient
Source§fn clone(&self) -> BucketClient
fn clone(&self) -> BucketClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BucketClient
impl !RefUnwindSafe for BucketClient
impl Send for BucketClient
impl Sync for BucketClient
impl Unpin for BucketClient
impl UnsafeUnpin for BucketClient
impl !UnwindSafe for BucketClient
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