[go: up one dir, main page]

write_hash

Function write_hash 

Source
pub async 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, skipping associating an index key with it.

ยงExample

use async_attributes;

#[async_attributes::main]
async fn main() -> cacache::Result<()> {
    cacache::write_hash("./my-cache", b"hello").await?;
    Ok(())
}