sled_web/
lib.rs

1//! A web interface to a `sled::Tree`.
2//!
3//! ## API
4//!
5//! | HTTP Request                      | Description
6//! |-----------------------------------|--------------------------------------
7//! | GET    /tree/entries/get          | Get a `Tree` entry by key.
8//! | DELETE /tree/entries/del          | Delete a `Tree` entry by key.
9//! | POST   /tree/entries/set          | Set a new `Tree` entry by key/value pair.
10//! | PUT    `/tree/entries/cas`        | Perform a compare-and-swap.
11//! | POST   `/tree/entries/merge`      | Merge a value into an entry for a key.
12//! | POST   `/tree/entries/flush`      | Flush and pending IO.
13//! | GET    /tree/entries/iter         | Iterate over all `Tree` entries.
14//! | GET    /tree/entries/scan         | Iterate over all `Tree` entries starting from a key.
15//! | GET    /tree/entries/scan_range   | Iterate over all `Tree` entries within a key range.
16//! | GET    /tree/entries/max          | Get the greatest `Tree` entry.
17//! | GET    /tree/entries/pred         | Get the `Tree` entry preceding a key.
18//! | GET    /tree/entries/pred_incl    | Get the `Tree` entry preceding or including a key.
19//! | GET    /tree/entries/succ         | Get the `Tree` entry succeeding a key.
20//! | GET    /tree/entries/succ_incl    | Get the `Tree` entry succeeding or including a key.
21//!
22//! See the `request` module for the expected request types. The server expects the corresponding
23//! request type serialized to JSON within the `Body` of the received `Request`.
24//!
25//! See the `response::response` function for the associated responses, their status and layout.
26
27#[macro_use] extern crate serde_derive;
28extern crate futures;
29extern crate http;
30extern crate serde;
31extern crate serde_json;
32pub extern crate hyper;
33pub extern crate sled_search;
34
35pub use client::Client;
36pub use sled_search::sled;
37
38pub mod client;
39pub mod request;
40pub mod response;
41pub mod server;