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§fn clone(&self) -> SpawnPolicy
fn clone(&self) -> SpawnPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SpawnPolicy
impl Debug for SpawnPolicy
Source§impl Default for SpawnPolicy
impl Default for SpawnPolicy
Source§fn default() -> SpawnPolicy
fn default() -> SpawnPolicy
Returns the “default value” for a type. Read more
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