pub trait RevocationStore: Send + Sync {
// Required methods
fn is_revoked(
&self,
capability_id: &str,
) -> Result<bool, RevocationStoreError>;
fn revoke(&self, capability_id: &str) -> Result<bool, RevocationStoreError>;
// Provided methods
fn observe_revocation(
&self,
capability_id: &str,
) -> Result<RevocationObservation, RevocationStoreError> { ... }
fn is_ephemeral(&self) -> bool { ... }
}Expand description
Trait for checking whether a capability has been revoked.
Implementations may be in-memory, SQLite-backed, or subscribe to a distributed revocation feed via Spine/NATS.
Required Methods§
Sourcefn is_revoked(&self, capability_id: &str) -> Result<bool, RevocationStoreError>
fn is_revoked(&self, capability_id: &str) -> Result<bool, RevocationStoreError>
Check if a capability ID has been revoked.
Provided Methods§
fn observe_revocation( &self, capability_id: &str, ) -> Result<RevocationObservation, RevocationStoreError>
Sourcefn is_ephemeral(&self) -> bool
fn is_ephemeral(&self) -> bool
Whether this store loses its revocation set on process restart. The
default is the safe (loud) assumption so an unknown store is treated as
ephemeral; durable and remote stores override to false.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".