pub struct ListOptionsBuilder<'bucket> { /* private fields */ }
Expand description

Options for configuring the list operation.

Implementations§

The number of results to return. Defaults to 1000, with a maximum of 1000.

The prefix to match keys against. Keys will only be returned if they start with given prefix.

An opaque token that indicates where to continue listing objects from. A cursor can be retrieved from a previous list operation.

The character to use when grouping keys.

If you populate this array, then items returned will include this metadata. A tradeoff is that fewer results may be returned depending on how big this data is. For now the caps are TBD but expect the total memory usage for a list operation may need to be <1MB or even <128kb depending on how many list operations you are sending into one bucket. Make sure to look at truncated for the result rather than having logic like

while listed.len() < limit {
    listed = bucket.list()
        .limit(limit),
        .include(vec![Include::CustomMetadata])
        .execute()
        .await?;
}

Executes the LIST operation on the R2 bucket.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.