blobstore
A content addressable store for arbitrary blobs.
Usage
Add the following to your Cargo.toml
file:
[]
= "*"
and import into your code:
extern crate blobstore;
Example
extern crate blobstore;
use BlobStore;
let mut data = "foo".as_bytes;
let store = new;
// this will accept any `std::io::Read` type
let hash = store.put.unwrap;
// hash is a SHA256 of the content
assert_eq!;
let mut value = String new;
store.get.unwrap.read_to_string.unwrap;
assert_eq!;
store.remove.unwrap;
remove_dir_all.unwrap;
API
BlobStore
implements the following trait: