Function cacache::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(())
}