pub struct CookbookCapabilityProfile;Expand description
The deterministic capability profile the cookbook seats its eval Cx with.
GRANTS the pure/offline/deterministic effects a recipe may legitimately need and DENIES (by omission) every live/effectful capability. A recipe requesting a denied capability fails closed: it is a Category D descriptor whose purpose is the denial. The profile is data, not a closed enum – the granted and denied vocabularies are named capability strings the kernel interns.
Implementations§
Source§impl CookbookCapabilityProfile
impl CookbookCapabilityProfile
Sourcepub fn granted() -> Vec<CapabilityName>
pub fn granted() -> Vec<CapabilityName>
The capabilities this profile GRANTS: read-construct, read-eval, and the pure/offline/deterministic effect vocabulary (compute, codec round-trip, offline render with no device, deterministic cassette replay, and a deterministic model fixture).
Sourcepub fn denied() -> Vec<CapabilityName>
pub fn denied() -> Vec<CapabilityName>
The capabilities this profile explicitly DENIES: live network, live hardware, process spawn, wall-clock time, filesystem writes, and unseeded entropy. These are the Category D boundary; a recipe requesting one fails closed and its purpose becomes the denial.
Sourcepub fn grants(capability: &CapabilityName) -> bool
pub fn grants(capability: &CapabilityName) -> bool
Whether this profile grants capability.
Sourcepub fn denies(capability: &CapabilityName) -> bool
pub fn denies(capability: &CapabilityName) -> bool
Whether this profile explicitly denies capability.
Sourcepub fn seat(seat: &GrantSeat, cx: &mut Cx) -> Result<()>
pub fn seat(seat: &GrantSeat, cx: &mut Cx) -> Result<()>
Seat cx with the profile: grant every granted capability through the
host seat (minted with the Cx by sim_kernel::Cx::new_seated).
Denied capabilities are never granted, so an op that demands one fails
closed. Granting is idempotent, so re-seating a Cx is a no-op beyond the
first call.
Trait Implementations§
Source§impl Clone for CookbookCapabilityProfile
impl Clone for CookbookCapabilityProfile
Source§fn clone(&self) -> CookbookCapabilityProfile
fn clone(&self) -> CookbookCapabilityProfile
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more