Struct indexkv::Store[][src]

pub struct Store<T: Serialize + DeserializeOwned> { /* fields omitted */ }

Implementations

Allocates a new Store containing no values. Opens a file descriptor to path.

Provides a sequential stream of all values in the Store. In relational database parlance, this would be a tablescan.

Looks up a single value by key. Will attempt to cache data positions in the backing file to minimize disk seeking. Returns Error::NotFound when key does not exist in the Store.

Looks up multiple values by key. Will find (uncached) keys in sorted order to minimize disk seeking back and forth. Does not return an error when key does not exist; calling code should check for Some vs None in the resulting HashMap for fallibility.

Consumes a stream of (key, value) pairs. Sequentially writes all the values to disk, noting their positions, then goes back and sequentially writes down the sorted index.

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.

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.