pub struct SubprocessInvokerConfig { /* private fields */ }Expand description
Configuration for SubprocessCallbackInvoker.
program is the external client command (an absolute path to the
client’s callback binary). args are appended on every spawn.
timeout bounds the total round trip — write request, read
response, child exit. A child still running at deadline is killed
and the invocation fails with SubprocessInvokerError::Timeout.
Implementations§
Source§impl SubprocessInvokerConfig
impl SubprocessInvokerConfig
Sourcepub fn new(program: impl Into<PathBuf>, timeout: Duration) -> Self
pub fn new(program: impl Into<PathBuf>, timeout: Duration) -> Self
Construct a config from an explicit program path and timeout. The default timeout is intentionally not provided — the caller must pick a value that matches its lifecycle SLOs.
Sourcepub fn arg(self, arg: impl Into<OsString>) -> Self
pub fn arg(self, arg: impl Into<OsString>) -> Self
Append a single argument. Returns self for chaining.
Sourcepub fn args<I, A>(self, args: I) -> Self
pub fn args<I, A>(self, args: I) -> Self
Append a sequence of arguments. Returns self for chaining.
pub fn program(&self) -> &PathBuf
pub fn timeout(&self) -> Duration
Trait Implementations§
Source§impl Clone for SubprocessInvokerConfig
impl Clone for SubprocessInvokerConfig
Source§fn clone(&self) -> SubprocessInvokerConfig
fn clone(&self) -> SubprocessInvokerConfig
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 moreAuto Trait Implementations§
impl Freeze for SubprocessInvokerConfig
impl RefUnwindSafe for SubprocessInvokerConfig
impl Send for SubprocessInvokerConfig
impl Sync for SubprocessInvokerConfig
impl Unpin for SubprocessInvokerConfig
impl UnsafeUnpin for SubprocessInvokerConfig
impl UnwindSafe for SubprocessInvokerConfig
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