rouchdb 0.3.2

Local-first document database with CouchDB replication protocol support
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use rouchdb::Database;

#[tokio::main]
async fn main() -> rouchdb::Result<()> {
    let db = Database::memory("test");

    let result = db
        .put("hello", serde_json::json!({"msg": "it works!"}))
        .await?;
    assert!(result.ok);

    let doc = db.get("hello").await?;
    println!("{}", doc.data["msg"]); // "it works!"

    Ok(())
}