Struct worker_plus::Bucket

source ·
pub struct Bucket { /* private fields */ }
Expand description

An instance of the R2 bucket binding.

Implementations§

Retrieves the Object for the given key containing only object metadata, if the key exists.

Retrieves the Object for the given key containing object metadata and the object body if the key exists. In the event that a precondition specified in options fails, get() returns an Object with no body.

Stores the given value and metadata under the associated key. Once the write succeeds, returns an Object containing metadata about the stored Object.

R2 writes are strongly consistent. Once the future resolves, all subsequent read operations will see this key value pair globally.

Deletes the given value and metadata under the associated key. Once the delete succeeds, returns void.

R2 deletes are strongly consistent. Once the Promise resolves, all subsequent read operations will no longer see this key value pair globally.

Returns an Objects containing a list of Objectss contained within the bucket. By default, returns the first 1000 entries.

Trait Implementations§

Converts this type into a shared reference of the (usually inferred) input type.
Formats the value using the given formatter. Read more
Converts to this type from the input type.
Performs a dynamic instanceof check to see whether the JsValue provided is an instance of this type. Read more
Performs a zero-cost unchecked conversion from a JsValue into an instance of Self Read more
Performs a zero-cost unchecked conversion from a &JsValue into an instance of &Self. Read more
Test whether this JS value has a type T. Read more
Performs a dynamic cast (checked at runtime) of this value into the target type T. Read more
Performs a dynamic cast (checked at runtime) of this value into the target type T. Read more
Performs a zero-cost unchecked cast into the specified type. Read more
Performs a zero-cost unchecked cast into a reference to the specified type. Read more
Test whether this JS value is an instance of the type T. Read more
Performs a dynamic check to see whether the JsValue provided is a value of this type. Read more

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.