Struct tetsy_kvdb_memorydb::InMemory[][src]

pub struct InMemory { /* fields omitted */ }
Expand description

A key-value database fulfilling the KeyValueDB trait, living in memory. This is generally intended for tests and is not particularly optimized.

Trait Implementations

Returns the “default value” for a type. Read more

Get a value by key.

Get the first value matching the given prefix.

Write a transaction of changes to the backing store.

Iterate over the data for a given column.

Iterate over the data for a given column, returning all key/value pairs where the key starts with the given prefix. Read more

Attempt to replace this database with a new one located at the given path.

Helper to create a new transaction.

Query statistics. Read more

Check for the existence of a value by key.

Check for the existence of a value by prefix.

Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. If T::size_of is a constant, consider implementing constant_size as well. Read more

Used to optimize MallocSizeOf implementation for collections like Vec and HashMap to avoid iterating over them unnecessarily. The Self: Sized bound is for object safety. 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

Performs the conversion.

Performs the conversion.

Method to launch a heapsize measurement with a fresh state. 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.