pub trait FactStore {
// Required methods
fn insert_authorized(
&mut self,
capabilities: &CapabilitySet,
data: &mut dyn DatumStore,
claim: Claim,
) -> Result<Ref>;
fn query_authorized(
&self,
cx: &Cx,
pattern: ClaimPattern,
) -> Result<Vec<Claim>>;
}Expand description
Contract for storing and querying Claims under visibility rules.
This is protocol the libraries implement; the kernel ships a BTreeMap-
backed BTreeFactStore and defines the capability-gated read rules, not
the persistence strategy.
Required Methods§
Inserts claim after checking the caller’s capabilities, returning its
content Ref; private claims require the fact-private capability.
Returns the claims matching pattern that are visible under cx’s
capabilities.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".