pub trait RevocationCache: Send + Sync {
// Required methods
fn insert(
&self,
target_kind: &str,
target_id: &str,
effective_at: &str,
) -> Result<(), StoreError>;
fn is_revoked(
&self,
target_kind: &str,
target_id: &str,
at: &str,
) -> Result<bool, StoreError>;
fn list(&self) -> Result<Vec<(String, String, String)>, StoreError>;
}Expand description
Revocation set. Conceptually a (target_kind, target_id) -> effective_at
map; is_revoked answers “was this target revoked at or before at?”
The SQL backends store this as a regular table; Redis stores it as
tf:revoke:<kind>:<id> keys whose value is the effective_at timestamp.
Required Methods§
fn insert( &self, target_kind: &str, target_id: &str, effective_at: &str, ) -> Result<(), StoreError>
fn is_revoked( &self, target_kind: &str, target_id: &str, at: &str, ) -> Result<bool, StoreError>
fn list(&self) -> Result<Vec<(String, String, String)>, StoreError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".