pub struct CapRights(/* private fields */);Expand description
Fixed-width rights bitset. Keep this an explicit allow-list: every new bit here must be audited against the threat-model doc before production.
Low two bits stay SEND / ASK so ABI-era 0.9 addressing tokens remain
compatible (SEND_ASK == 0b11).
Implementations§
Source§impl CapRights
impl CapRights
pub const NONE: CapRights
pub const SEND: CapRights
pub const ASK: CapRights
pub const RECV: CapRights
pub const SPAWN: CapRights
pub const LINK: CapRights
pub const MONITOR: CapRights
pub const ADMIN: CapRights
pub const NATIVE: CapRights
Sourcepub const ADDRESSING: CapRights
pub const ADDRESSING: CapRights
Addressing grant minted on SelfPid / Spawn / grant_cap.
Sourcepub const FLOW: CapRights
pub const FLOW: CapRights
Default child request from the high-level assembler (Fn::spawn).
Does not include ADMIN. The raw opcode with c = 0 is confined
(NONE); the assembler writes this mask so existing actor samples
keep working without an implicit second grant path.
Sourcepub const ROOT: CapRights = Self::FLOW
pub const ROOT: CapRights = Self::FLOW
Host-spawned root authority (init). Same as Self::FLOW — ADMIN
is never in the default set; the embedder mints it explicitly.
pub const fn empty() -> Self
pub const fn union(self, other: CapRights) -> CapRights
pub const fn intersect(self, other: CapRights) -> CapRights
pub const fn contains(self, other: CapRights) -> bool
pub const fn is_subset_of(self, other: CapRights) -> bool
pub const fn bits(self) -> u32
pub const fn from_bits(bits: u32) -> Self
pub const fn from_u8(bits: u8) -> Self
Trait Implementations§
impl Copy for CapRights
impl Eq for CapRights
impl StructuralPartialEq for CapRights
Auto Trait Implementations§
impl Freeze for CapRights
impl RefUnwindSafe for CapRights
impl Send for CapRights
impl Sync for CapRights
impl Unpin for CapRights
impl UnsafeUnpin for CapRights
impl UnwindSafe for CapRights
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.