casbin 2.20.0

An authorization library that supports access control models like ACL, RBAC, ABAC.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::{cache::Cache, core_api::CoreApi};

use std::hash::Hash;

pub trait CachedApi<K, V>: CoreApi + Send + Sync
where
    K: Eq + Hash,
    V: Clone,
{
    fn get_mut_cache(&mut self) -> &mut dyn Cache<K, V>;
    fn set_cache(&mut self, cache: Box<dyn Cache<K, V>>);
}