pub struct SpawnPolicy { /* private fields */ }Expand description
Per-dispatch spawn confinement policy handed to tools via
crate::Context::spawn.
runner: None = inert policy: Self::command returns a plain
command (the dispatcher counts and warns the degradation).
Implementations§
Source§impl SpawnPolicy
impl SpawnPolicy
Sourcepub const fn from_runner(runner: Option<PathBuf>, allow_net: bool) -> Self
pub const fn from_runner(runner: Option<PathBuf>, allow_net: bool) -> Self
Build from a resolved runner path and network grant.
Sourcepub fn detected(allow_net: bool) -> Self
pub fn detected(allow_net: bool) -> Self
Detect a runner and build a policy with an explicit net grant.
Sourcepub fn for_effects(effects: &EffectRow) -> Self
pub fn for_effects(effects: &EffectRow) -> Self
Detect a runner and derive the net grant from the effect row.
Sourcepub fn envelope(&self, program: &str, args: &[&str]) -> Value
pub fn envelope(&self, program: &str, args: &[&str]) -> Value
Build the envelope the OS runner interprets.
Sourcepub fn envelope_json(&self, program: &str, args: &[&str]) -> String
pub fn envelope_json(&self, program: &str, args: &[&str]) -> String
Serialized envelope (what actually lands on the runner’s argv).
Trait Implementations§
Source§impl Clone for SpawnPolicy
impl Clone for SpawnPolicy
Source§impl Debug for SpawnPolicy
impl Debug for SpawnPolicy
Auto Trait Implementations§
impl Freeze for SpawnPolicy
impl RefUnwindSafe for SpawnPolicy
impl Send for SpawnPolicy
impl Sync for SpawnPolicy
impl Unpin for SpawnPolicy
impl UnsafeUnpin for SpawnPolicy
impl UnwindSafe for SpawnPolicy
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