write_hash

Function write_hash 

Source
pub fn write_hash<P, D>(cache: P, data: D) -> Result<Integrity>
where P: AsRef<Path>, D: AsRef<[u8]>,
Expand description

Writes data to the cache synchronously, skipping associating a key with it.

ยงExample

use std::io::Read;

fn main() -> cacache_sync::Result<()> {
    let data = cacache_sync::write_hash("./my-cache", b"hello")?;
    Ok(())
}