pub async fn copy<P, K, Q>(cache: P, key: K, to: Q) -> Result<u64>
Expand description
Copies cache data to a specified location. Returns the number of bytes copied.
ยงExample
use async_std::prelude::*;
use async_attributes;
#[async_attributes::main]
async fn main() -> cacache::Result<()> {
cacache::copy("./my-cache", "my-key", "./data.txt").await?;
Ok(())
}