pub struct ExecIo { /* private fields */ }Implementations§
Source§impl ExecIo
impl ExecIo
pub fn new() -> Self
pub fn set_stdin(&mut self, stdin: Option<SharedInput>)
pub fn set_stdout(&mut self, stdout: Option<SharedOutput>)
pub fn set_stderr(&mut self, stderr: Option<SharedOutput>)
Sourcepub fn set_worker_counter(&mut self, counter: Arc<AtomicU64>) -> &mut Self
pub fn set_worker_counter(&mut self, counter: Arc<AtomicU64>) -> &mut Self
Stage this run’s pump-worker count. Chainable.
Sourcepub fn worker_counter(&self) -> Arc<AtomicU64> ⓘ
pub fn worker_counter(&self) -> Arc<AtomicU64> ⓘ
This run’s shared pump-worker count.
Sourcepub fn set_interpreter<S: Into<String>>(&mut self, path: S) -> &mut Self
pub fn set_interpreter<S: Into<String>>(&mut self, path: S) -> &mut Self
Stage the INTERPRETER() path for this run. Chainable. Embedding
hosts whose engine runs in-process (no CLI binary as the current
executable) point this at their CLI so child reinvocation leaves
the process boundary intact.
Sourcepub fn interpreter_override(&self) -> Option<String>
pub fn interpreter_override(&self) -> Option<String>
The staged interpreter path, if any. None selects the
current_exe default.
Sourcepub fn set_script_args<I, S>(&mut self, args: I) -> &mut Self
pub fn set_script_args<I, S>(&mut self, args: I) -> &mut Self
Stage this run’s script args for STD::ARGV(). Chainable.
Callers pass the post-separator tail: the CLI strips one leading
-- before staging, so embedded hosts stage already-stripped args.
Sourcepub fn script_args(&self) -> &[String]
pub fn script_args(&self) -> &[String]
The staged script args for this run.
Sourcepub fn set_remote_runner_for_target(
&mut self,
target: String,
runner: Arc<dyn RemoteRunner>,
) -> &mut Self
pub fn set_remote_runner_for_target( &mut self, target: String, runner: Arc<dyn RemoteRunner>, ) -> &mut Self
Stage the transport behind one REMOTE target. Chainable; the NET
plugin registers one session per inventory target at CLI startup
and tests stage mocks. Registration is inert (no process spawns
until a block entry runs).
Sourcepub fn remote_runner(&self, target: &str) -> Option<Arc<dyn RemoteRunner>>
pub fn remote_runner(&self, target: &str) -> Option<Arc<dyn RemoteRunner>>
The staged remote transport for target, if any. REMOTE
interception bails when the target has no runner.
Sourcepub fn set_remote_runner(&mut self, runner: Arc<dyn RemoteRunner>) -> &mut Self
pub fn set_remote_runner(&mut self, runner: Arc<dyn RemoteRunner>) -> &mut Self
Legacy single-runner staging: registers under the empty target.
Prefer set_remote_runner_for_target.
Sourcepub fn set_remote_guest(&mut self, guest: bool) -> &mut Self
pub fn set_remote_guest(&mut self, guest: bool) -> &mut Self
Mark this run as executing inside a remote guest serve loop. In
guest mode, flagged COPY --from-host / --to-host steps are
transfer declarations already fulfilled by the session, so they
acknowledge as no-ops instead of re-copying. Never set on hosts:
the parser rejects flagged copies outside REMOTE bodies, and
hosts never execute REMOTE bodies.
Sourcepub fn is_remote_guest(&self) -> bool
pub fn is_remote_guest(&self) -> bool
Whether flagged COPY transfer declarations acknowledge as no-ops.
Sourcepub fn set_push_manifest_sink(&mut self, sink: PushManifestSink) -> &mut Self
pub fn set_push_manifest_sink(&mut self, sink: PushManifestSink) -> &mut Self
Stage the shared push-manifest sink for a guest serve loop.
Chainable. Executed flagged COPY steps append here; the serve
loop packs exactly these entries after the engine joins.
pub fn insert_inherit_env<S: Into<String>, V: Into<String>>( &mut self, key: S, value: V, )
pub fn remove_inherit_env<S: Into<String>>(&mut self, key: S)
pub fn inherit_env_value(&self, key: &str) -> Option<&String>
pub fn inherit_env_is_removed(&self, key: &str) -> bool
pub fn inherit_env_overrides(&self) -> &HashMap<String, String>
Sourcepub fn peek_pipe_content(&self, handle: &PipeHandle) -> Result<Vec<u8>>
pub fn peek_pipe_content(&self, handle: &PipeHandle) -> Result<Vec<u8>>
Non-destructive snapshot of a script handle’s buffered bytes for pipe-content assertions.
Public so out-of-crate harnesses can assert on script-owned pipes
after a run completes, via the PIPE values in the returned
bindings. Only meaningful once writers detached (post-run);
unbound handles and OS pairs bail loudly.
pub fn stdin(&self) -> Option<SharedInput>
pub fn stdout(&self) -> Option<SharedOutput>
pub fn stderr(&self) -> Option<SharedOutput>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ExecIo
impl !UnwindSafe for ExecIo
impl Forget for ExecIo
impl Freeze for ExecIo
impl Move for ExecIo
impl Send for ExecIo
impl Sync for ExecIo
impl Unpin for ExecIo
impl UnsafeUnpin for ExecIo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.