pub struct RuntimeCapabilities { /* private fields */ }Expand description
Merry-managed low-level capability policy.
This constrains capabilities owned by Merry-managed runners, such as file and process access lanes. It is not a complete product runtime profile or a trust label for arbitrary host code or in-process tool executors.
Implementations§
Source§impl RuntimeCapabilities
impl RuntimeCapabilities
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates the default capability policy.
The default denies network and starts with no path grants.
Sourcepub fn allow_network(self) -> Self
pub fn allow_network(self) -> Self
Allows Merry-managed network capability for this runtime.
Sourcepub fn deny_network(self) -> Self
pub fn deny_network(self) -> Self
Denies Merry-managed network capability for this runtime.
Sourcepub fn with_path_rule(self, rule: PathAccessRule) -> Self
pub fn with_path_rule(self, rule: PathAccessRule) -> Self
Adds one path access rule to this profile.
Sourcepub fn with_path_rules(self, rules: Vec<PathAccessRule>) -> Self
pub fn with_path_rules(self, rules: Vec<PathAccessRule>) -> Self
Replaces all path access rules for this profile.
Sourcepub fn network_allowed(&self) -> bool
pub fn network_allowed(&self) -> bool
Returns whether Merry-managed network capability is allowed.
Sourcepub fn path_rules(&self) -> &[PathAccessRule]
pub fn path_rules(&self) -> &[PathAccessRule]
Returns platform-neutral path access rules for Merry-managed backends.
Trait Implementations§
Source§impl Clone for RuntimeCapabilities
impl Clone for RuntimeCapabilities
Source§impl Debug for RuntimeCapabilities
impl Debug for RuntimeCapabilities
Source§impl Default for RuntimeCapabilities
impl Default for RuntimeCapabilities
impl Eq for RuntimeCapabilities
Source§impl PartialEq for RuntimeCapabilities
impl PartialEq for RuntimeCapabilities
impl StructuralPartialEq for RuntimeCapabilities
Auto Trait Implementations§
impl Forget for RuntimeCapabilities
impl Freeze for RuntimeCapabilities
impl Move for RuntimeCapabilities
impl RefUnwindSafe for RuntimeCapabilities
impl Send for RuntimeCapabilitieswhere
RawVecInner: Send,
impl Sync for RuntimeCapabilitieswhere
RawVecInner: Sync,
impl Unpin for RuntimeCapabilities
impl UnsafeUnpin for RuntimeCapabilities
impl UnwindSafe for RuntimeCapabilitieswhere
RawVecInner: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.