/// Opens the file handle for writing, returning a Put instance.
Opens the file handle for writing, returning a Put instance.
Opens the file handle for writing returning a Put instance .
pub fn open<P, K>(self, cache: P, key: K) -> Result<Put, Error>
    where
        P: AsRef<Path>,
        K: AsRef<str>,
    {
        Ok(Put {
            cache: cache.as_ref().to_path_buf(),
            key: String::from(key.as_ref()),
            written: 0,
            writer: write::Writer::new(
                cache.as_ref(),
                *self.algorithm.as_ref().unwrap_or(&Algorithm::Sha256),
            )?,
            opts: self,
        })
    }
pub fn open < P , K > ( self , cache : P , key : K ) -> Result < Put , Error > where P : AsRef < Path > , K : AsRef < str > , { Ok ( Put { cache : cache . as_ref ( ) . to_path_buf ( ) , key : String :: from ( key . as_ref ( ) ) , written : 0 , writer : write :: Writer :: new ( cache . as_ref ( ) , * self . algorithm . as_ref ( ) . unwrap_or ( & Algorithm :: Sha256 ) , ) ? , opts : self , } ) }
Opens the file handle for writing, returning a Put instance.
Opens the file handle for writing returning a Put instance .
self
cache
P
key
K