1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//! This crate represents the official, yet under heavy development, Rust SDK for Couchbase.
//!
//! It is based on the `couchbase_sys`-crate, which in turn consists of Rust bindings to the
//! [libcouchbase](https://github.com/couchbase/libcouchbase) c-library.
//!
//! # Examples
//!
//! Reading and writing a `Document` is simple:
//!
//! ```rust,no_run
//! extern crate couchbase;
//! extern crate futures;
//!
//! use couchbase::{Document, Cluster};
//! use couchbase::document::BinaryDocument;
//! use futures::Future;
//!
//! /// A very simple example which connects to the `default` bucket and writes and loads
//! /// a document.
//! fn main() {
//! // Initialize the Cluster
//! let cluster = Cluster::new("localhost").expect("Could not initialize Cluster");
//!
//! // If you auth with 5.0 / RBAC, use this:
//! // cluster.authenticate("Administrator", "password");
//!
//! // Open the travel-sample bucket
//! let bucket = cluster.open_bucket("default", None).expect("Could not open Bucket");
//!
//! // Create a document and store it in the bucket
//! let document = BinaryDocument::create("hello", None, Some("abc".as_bytes().to_owned()), None);
//! println!("Wrote Document {:?}",
//! bucket.upsert(document)
//! .wait()
//! .expect("Upsert failed!"));
//!
//! // Load the previously written document and print it out
//! let document: BinaryDocument = bucket.get("hello").wait().expect("Could not load Document");
//! println!("Found Document {:?}", document);
//!
//! }
//! ```
//!
//! For now, more examples can be found under `examples`. Note that for all the `serde`-based
//! examples you need to at least have Rust 1.15.0 installed.
//!
extern crate couchbase_sys;
extern crate log;
extern crate futures;
extern crate url;
extern crate parking_lot;
extern crate serde;
extern crate serde_derive;
extern crate serde_json;
pub use ;
pub use Bucket;
pub use Cluster;
pub use ;
pub use CouchbaseError;
pub use ;
pub use ;