Struct kv::Bucket

source · []
pub struct Bucket<'a, K: Key<'a>, V: Value>(_, _, _, _);
Expand description

Provides typed access to the key/value store

Implementations

Returns true if the bucket contains the given key

Get the value associated with the specified key

Set the value associated with the specified key to the provided value

Set the value associated with the specified key to the provided value, only if the existing value matches the old parameter

Remove the value associated with the specified key from the database

Get an iterator over keys/values

Get an iterator over keys/values in the specified range

Iterate over keys/values with the specified prefix

Apply batch update

Get updates when a key with the given prefix is changed

Execute a transaction

Create a transaction with access to two buckets

Create a transaction with access to three buckets

Get previous key and value in order, if one exists

Get next key and value in order, if one exists

Flush to disk

Flush to disk

Remove and return the last item

Remove and return the first item

Get the first item

Get the last item

Get the number of items

Returns true when there are no items

Remove all items

CRC32 checksum of all keys and values

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. 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 alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

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

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

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.