pub struct HostLauncher;Expand description
Runs a script on the host as sh -c <script>, the default CommandLauncher.
The working directory is the workspace root, and the environment follows the workspace
policy: cleared, then Workspace::bash_env, unless Workspace::inherit_env is set.
The working directory is not an OS boundary; a command can reach absolute paths and the
network.
Implements spec 3.1 §10 D1.
§Example
use adk_devtools::{CommandLauncher, HostLauncher};
assert_eq!(HostLauncher.isolation(), "host");Trait Implementations§
Source§impl Clone for HostLauncher
impl Clone for HostLauncher
Source§impl CommandLauncher for HostLauncher
impl CommandLauncher for HostLauncher
Source§fn command(
&self,
ws: &Workspace,
script: &str,
_ctx: &dyn ToolContext,
) -> Result<Command, DevToolError>
fn command( &self, ws: &Workspace, script: &str, _ctx: &dyn ToolContext, ) -> Result<Command, DevToolError>
Source§fn isolation(&self) -> &str
fn isolation(&self) -> &str
A short label for the isolation this launcher provides, such as
"host".Source§fn guarded_command(
&self,
ws: &Workspace,
script: &str,
ctx: &dyn ToolContext,
) -> Result<(Command, Option<LaunchGuard>), DevToolError>
fn guarded_command( &self, ws: &Workspace, script: &str, ctx: &dyn ToolContext, ) -> Result<(Command, Option<LaunchGuard>), DevToolError>
Source§fn egress(&self) -> ToolEgress
fn egress(&self) -> ToolEgress
What the commands this launcher builds reach on the network, which
bash declares as
its Tool::egress. The default,
ToolEgress::Undeclared, is refused under a run egress policy; a wrapping launcher
forwards its inner launcher’s.impl Copy for HostLauncher
Source§impl Debug for HostLauncher
impl Debug for HostLauncher
Auto Trait Implementations§
impl Forget for HostLauncher
impl Freeze for HostLauncher
impl Move for HostLauncher
impl RefUnwindSafe for HostLauncher
impl Send for HostLauncher
impl Sync for HostLauncher
impl Unpin for HostLauncher
impl UnsafeUnpin for HostLauncher
impl UnwindSafe for HostLauncher
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