pub struct Phase {
pub name: String,
pub allowed_caps: Vec<String>,
pub forbidden_caps: Vec<String>,
pub interruptible: bool,
}Expand description
An execution phase with an associated capability allow-list.
Fields§
§name: StringPhase name (e.g., “init”, “execute”, “commit”).
allowed_caps: Vec<String>Capabilities allowed during this phase.
forbidden_caps: Vec<String>Capabilities explicitly forbidden during this phase.
interruptible: boolWhether this phase can be interrupted.
Implementations§
Source§impl Phase
impl Phase
Sourcepub fn non_interruptible(self) -> Self
pub fn non_interruptible(self) -> Self
Marks the scope non-interruptible.
Sourcepub fn is_allowed(&self, cap: &str) -> bool
pub fn is_allowed(&self, cap: &str) -> bool
Check if a capability is allowed in this phase.
Sourcepub fn is_forbidden(&self, cap: &str) -> bool
pub fn is_forbidden(&self, cap: &str) -> bool
Check if a capability is forbidden in this phase.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Phase
impl RefUnwindSafe for Phase
impl Send for Phase
impl Sync for Phase
impl Unpin for Phase
impl UnsafeUnpin for Phase
impl UnwindSafe for Phase
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