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,
) -> DiagnosticResult<Vec<u8>>
pub fn peek_pipe_content( &self, handle: &PipeHandle, ) -> DiagnosticResult<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 ExecIowhere
*const ArcInner<Mutex<dyn Read + Send>> is !null: Freeze,
PhantomData<ArcInner<Mutex<dyn Read + Send>>>: Freeze,
*const ArcInner<Mutex<dyn Write + Send>> is !null: Freeze,
PhantomData<ArcInner<Mutex<dyn Write + Send>>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<(String, String)>: Freeze,
PhantomData<(String, ())>: Freeze,
PhantomData<(String, Arc<dyn RemoteRunner>)>: Freeze,
*const ArcInner<Mutex<Vec<(String, String)>>> is !null: Freeze,
PhantomData<ArcInner<Mutex<Vec<(String, String)>>>>: Freeze,
*const ArcInner<Atomic<u64>> is !null: Freeze,
PhantomData<ArcInner<Atomic<u64>>>: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
impl Move for ExecIo
impl Send for ExecIo
impl Sync for ExecIo
impl Unpin for ExecIo
impl UnsafeUnpin for ExecIowhere
*const ArcInner<Mutex<dyn Read + Send>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<dyn Read + Send>>>: UnsafeUnpin,
*const ArcInner<Mutex<dyn Write + Send>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<dyn Write + Send>>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<(String, String)>: UnsafeUnpin,
PhantomData<(String, ())>: UnsafeUnpin,
PhantomData<(String, Arc<dyn RemoteRunner>)>: UnsafeUnpin,
*const ArcInner<Mutex<Vec<(String, String)>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<Vec<(String, String)>>>>: UnsafeUnpin,
*const ArcInner<Atomic<u64>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<u64>>>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
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.