Trait kvcache::Cache

source ·
pub trait Cache {
    // Required methods
    async fn _get(&self, suffix: &[u8], keys: &[Box<[u8]>]) -> Result<Vov>;
    async fn _set(&self, suffix: &[u8], map: Map) -> Result<()>;

    // Provided methods
    async fn getset_str<K: IntoIterator<Item = Ref> + Send, Ref: AsRef<[u8]>, F: IntoFuture<Output = Result<Vec<String>>>>(
        &self,
        suffix: impl AsRef<[u8]>,
        keys: K,
        get: impl Fn(Vec<String>) -> F + Copy
    ) -> Result<Vec<String>> { ... }
    async fn getset<K: IntoIterator<Item = Ref> + Send, Ref: AsRef<[u8]>, F: IntoFuture<Output = Result<Vec<Box<[u8]>>>>>(
        &self,
        suffix: impl AsRef<[u8]>,
        keys: K,
        get: impl Fn(Vec<Box<[u8]>>) -> F
    ) -> Result<Vv> { ... }
}

Required Methods§

source

async fn _get(&self, suffix: &[u8], keys: &[Box<[u8]>]) -> Result<Vov>

source

async fn _set(&self, suffix: &[u8], map: Map) -> Result<()>

Provided Methods§

source

async fn getset_str<K: IntoIterator<Item = Ref> + Send, Ref: AsRef<[u8]>, F: IntoFuture<Output = Result<Vec<String>>>>( &self, suffix: impl AsRef<[u8]>, keys: K, get: impl Fn(Vec<String>) -> F + Copy ) -> Result<Vec<String>>

source

async fn getset<K: IntoIterator<Item = Ref> + Send, Ref: AsRef<[u8]>, F: IntoFuture<Output = Result<Vec<Box<[u8]>>>>>( &self, suffix: impl AsRef<[u8]>, keys: K, get: impl Fn(Vec<Box<[u8]>>) -> F ) -> Result<Vv>

Object Safety§

This trait is not object safe.

Implementors§