pub struct ListObjectsV2<'a> { /* private fields */ }
Expand description

List all objects in the bucket.

If next_continuation_token is Some the response is truncated, and the rest of the list can be retrieved by reusing the ListObjectV2 action but with continuation-token set to the value of next_continuation_token received in the previous response.

Find out more about ListObjectsV2 from the AWS API Reference

Implementations§

source§

impl<'a> ListObjectsV2<'a>

source

pub fn new(bucket: &'a Bucket, credentials: Option<&'a Credentials>) -> Self

source

pub fn with_prefix(&mut self, prefix: impl Into<Cow<'a, str>>)

Limits the response to keys that begin with the specified prefix.

See https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html#API_ListObjectsV2_RequestSyntax for more infos.

Example
let mut list = bucket.list_objects_v2(None);
list.with_prefix("tamo");
source

pub fn with_start_after(&mut self, start_after: impl Into<Cow<'a, str>>)

StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this specified key. StartAfter can be any key in the bucket.

See https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html#API_ListObjectsV2_RequestSyntax for more infos.

Example
let mut list = bucket.list_objects_v2(None);
list.with_start_after("tamo"); // <- This token should come from a previous call to the list API.
source

pub fn with_continuation_token( &mut self, continuation_token: impl Into<Cow<'a, str>> )

ContinuationToken indicates to Amazon S3 that the list is being continued on this bucket with a token. ContinuationToken is obfuscated and is not a real key.

See https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html#API_ListObjectsV2_RequestSyntax for more infos.

Example
let mut list = bucket.list_objects_v2(None);
list.with_continuation_token("tamo"); // <- This token should come from a previous call to the list API.
source

pub fn with_max_keys(&mut self, max_keys: usize)

Sets the maximum number of keys returned in the response. By default, the action returns up to 1,000 key names. The response might contain fewer keys but will never contain more.

See https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html#API_ListObjectsV2_RequestSyntax for more infos.

Example
let mut list = bucket.list_objects_v2(None);
list.with_continuation_token("tamo"); // <- This token should come from a previous call to the list API.
source

pub fn parse_response(s: &str) -> Result<ListObjectsV2Response, DeError>

Trait Implementations§

source§

impl<'a> Clone for ListObjectsV2<'a>

source§

fn clone(&self) -> ListObjectsV2<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for ListObjectsV2<'a>

source§

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

Formats the value using the given formatter. Read more
source§

impl<'a> S3Action<'a> for ListObjectsV2<'a>

source§

const METHOD: Method = Method::Get

source§

fn query_mut(&mut self) -> &mut Map<'a>

Get a mutable reference to the query string of this action
source§

fn headers_mut(&mut self) -> &mut Map<'a>

Get a mutable reference to the signed headers of this action Read more
source§

fn sign_with_time(&self, expires_in: Duration, time: &OffsetDateTime) -> Url

Takes the time at which the URL should be signed Used for testing purposes
source§

fn sign(&self, expires_in: Duration) -> Url

Sign a request for this action, using METHOD for the Method

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for ListObjectsV2<'a>

§

impl<'a> Send for ListObjectsV2<'a>

§

impl<'a> Sync for ListObjectsV2<'a>

§

impl<'a> Unpin for ListObjectsV2<'a>

§

impl<'a> UnwindSafe for ListObjectsV2<'a>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.