focuson_cas 0.0.1

A content-addressable storage library implemented in Rust.
Documentation
1
2
3
4
5
6
7
8
9
// src/storage.rs

use std::io::Result;

/// Defines the interface for a content addressable storage mechanism.
pub trait ContentAddressableStorage {
    fn store(&self, data: &[u8]) -> Result<String>;
    fn retrieve(&self, id: &str) -> Result<Vec<u8>>;
}