Struct sled_web::client::Client[][src]

pub struct Client { /* fields omitted */ }

A hyper Client wrapper that simplifies communication with the sled Tree server.

Methods

impl Client
[src]

Create a new Client pointing towards the given Uri.

The Uri should contain the Scheme and Authority parts of the URI but not the following path. This following path will be created as necessary within each of the request calls.

A method for performing the Get request.

Given the key for an entry in the sled::Tree, produce a Future with the value.

A method for performing the Del request.

Given the key for an entry in the sled::Tree, delete the entry and return a Future with the removed value.

A method for performing the Set request.

Send the given key and value to the database for insertion into the sled::Tree.

A method for performing the Cas request.

Compare and swap. Capable of unique creation, conditional modification, or deletion.

If old is None, this will only set the value if it doesn't exist yet. If new is None, will delete the value if old is correct. If both old and new are Some, will modify the value if old is correct.

If Tree is read-only, will do nothing.

A method for performing the Merge request.

Merge a new value into the total state for a key.

A method for performing the Flush request.

Flushes any pending IO buffers to disk to ensure durability.

A method for performing the Iter request.

The result is a Stream of ordered key value pairs.

A method for performing the Scan request.

The result is a Stream of ordered key value pairs, starting from the given key.

A method for performing the Scan request.

The result is a Stream of all ordered key value pairs within the given key range.

A method for perfomring the Max request.

The result is a Future yielding the greatest entry in the sled::Tree.

Returns None if there are no entries within the tree.

A method for performing the Pred request.

Given the key for an entry in the sled::Tree, produce a Future with the preceding entry.

A method for performing the PredIncl request.

Given the key for an entry in the sled::Tree, produce a Future with the preceding entry or the entry associated with the key if there is one.

A method for performing the Succ request.

Given the key for an entry in the sled::Tree, produce a Future with the following entry.

A method for performing the SuccIncl request.

Given the key for an entry in the sled::Tree, produce a Future with the following entry or the entry associated with the key if there is one.

Trait Implementations

impl Clone for Client
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Client
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Client

impl Sync for Client