Skip to main content

Client

Struct Client 

Source
pub struct Client<H: HttpClient> { /* private fields */ }

Implementations§

Source§

impl<H: HttpClient> Client<H>

Source

pub async fn list_buckets(&self) -> Result<ListBucketsOutput, Error>

Source

pub async fn create_bucket( &self, bucket: &str, location_constraint: Option<&str>, ) -> Result<(), Error>

Source

pub async fn head_bucket(&self, bucket: &str) -> Result<(), Error>

Source

pub async fn delete_bucket(&self, bucket: &str) -> Result<(), Error>

Source

pub async fn list_objects( &self, bucket: &str, prefix: Option<&str>, continuation_token: Option<&str>, max_keys: Option<u32>, ) -> Result<ListObjectsOutput, Error>

Source

pub async fn get_bucket_location( &self, bucket: &str, ) -> Result<GetBucketLocationOutput, Error>

Source§

impl<H: HttpClient> Client<H>

Source

pub fn with_http_client( config: &ClientConfig<'_>, http: H, ) -> Result<Self, Error>

Source§

impl Client<ReqwestHttpClient>

Source

pub fn new(config: &ClientConfig<'_>) -> Result<Self, Error>

Source§

impl<H: HttpClient> Client<H>

Source

pub async fn put_object( &self, bucket: &str, key: &str, body: &[u8], ) -> Result<(), Error>

Source

pub async fn get_object( &self, bucket: &str, key: &str, ) -> Result<GetObjectOutput, Error>

Source

pub async fn head_object( &self, bucket: &str, key: &str, ) -> Result<HeadObjectOutput, Error>

Source

pub async fn delete_object(&self, bucket: &str, key: &str) -> Result<(), Error>

Source

pub async fn delete_objects( &self, bucket: &str, keys: &[&str], ) -> Result<DeleteObjectsOutput, Error>

Source

pub async fn create_multipart_upload( &self, bucket: &str, key: &str, ) -> Result<String, Error>

Source

pub async fn upload_part( &self, bucket: &str, key: &str, upload_id: &str, part_number: u32, body: &[u8], ) -> Result<UploadPartOutput, Error>

Source

pub async fn complete_multipart_upload( &self, bucket: &str, key: &str, upload_id: &str, parts: &[CompletedPart], ) -> Result<CompleteMultipartUploadOutput, Error>

Source

pub async fn abort_multipart_upload( &self, bucket: &str, key: &str, upload_id: &str, ) -> Result<(), Error>

Source

pub async fn list_multipart_uploads( &self, bucket: &str, ) -> Result<ListMultipartUploadsOutput, Error>

Source

pub async fn list_parts( &self, bucket: &str, key: &str, upload_id: &str, ) -> Result<ListPartsOutput, Error>

Source

pub async fn put_object_tagging( &self, bucket: &str, key: &str, tags: &[Tag], ) -> Result<(), Error>

Source

pub async fn get_object_tagging( &self, bucket: &str, key: &str, ) -> Result<GetObjectTaggingOutput, Error>

Source

pub async fn delete_object_tagging( &self, bucket: &str, key: &str, ) -> Result<(), Error>

Trait Implementations§

Source§

impl<H: Debug + HttpClient> Debug for Client<H>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<H> Freeze for Client<H>
where H: Freeze,

§

impl<H> RefUnwindSafe for Client<H>
where H: RefUnwindSafe,

§

impl<H> Send for Client<H>

§

impl<H> Sync for Client<H>

§

impl<H> Unpin for Client<H>
where H: Unpin,

§

impl<H> UnsafeUnpin for Client<H>
where H: UnsafeUnpin,

§

impl<H> UnwindSafe for Client<H>
where H: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more