HyperDB Rust Client
Author: Afaan Bilal
Introduction
HyperDB Rust is a Rust client crate for the HyperDB server.
Installation
cargo add hyperdb-rs
Example usage
use hyperdb_rs;
let mut hyper = new;
// Ping the server
let mut r = hyper.ping.expect;
println!; // PONG
// Get the version number
r = hyper.version.expect;
println!; // "[HyperDB v0.2.0 (https://afaan.dev)]"
// Set a value
r = hyper.set.expect;
println!; // value
// Check if a key is present
r = hyper.has.expect;
println!; // YES
// Get a value
r = hyper.get.expect;
println!; // value
// Get all stored data
r = hyper.all.expect;
println!; // {"test": "value"}
// Remove a key
r = hyper.delete.expect;
println!; // OK
// Delete all stored data
r = hyper.clear.expect;
println!; // OK
// Check if the store is empty
r = hyper.empty.expect;
println!; // YES
// Persist the store to disk
r = hyper.save.expect;
println!; // OK
// Reload the store from disk
r = hyper.reload.expect;
println!; // OK
// Delete all store data from memory and disk
r = hyper.reset.expect;
println!; // OK
Test
cargo test
Contributing
All contributions are welcome. Please create an issue first for any feature request or bug. Then fork the repository, create a branch and make any changes to fix the bug or add the feature and create a pull request. That's it! Thanks!
License
HyperDB Rust is released under the MIT License. Check out the full license here.