Struct leveldb_rs::DB [] [src]

pub struct DB { /* fields omitted */ }

This struct represents an open instance of the database.

Methods

impl DB
[src]

Open a database at the given path. Returns a Result indicating whether the database could be opened. Note that this function will not create the database at the given location if it does not exist.

Create and returns a database at the given path.

Open a database at the given path, using the provided options to control the open behaviour. Returns a Result indicating whether or not the database could be opened.

Set the database entry for "key" to "value". Returns a result indicating the success or failure of the operation.

Set the database entry for "key" to "value". Allows specifying the write options to use for this operaton.

Remove the database entry (if any) for "key". Returns a result indicating the success of the operation. It is not an error if "key" did not exist in the database.

Remove the database entry (if any) for "key". As delete(), but allows specifying the write options to use for this operation.

Apply the specified updates to the database, as given in the provided DBWriteBatch. Returns a result indicating the success of the operation.

Apply the given write batch. As write(), but allows specifying the write options to use for this operation.

If the database contains an entry for "key", return the associated value - otherwise, return None. This value is wrapped in a Result to indicate if an error occurred.

Get the value for a given key. As get(), but allows specifying the options to use when reading.

Return an iterator over the database.

Return a snapshot of the database.

Trait Implementations

impl Clone for DB
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Send for DB
[src]

impl Sync for DB
[src]