Function cacache::copy

source · []
pub async fn copy<P, K, Q>(cache: P, key: K, to: Q) -> Result<u64> where
    P: AsRef<Path>,
    K: AsRef<str>,
    Q: AsRef<Path>, 
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(())
}