pub struct SpawnSpec {
pub command: String,
pub args: Vec<String>,
pub timeout: Option<Duration>,
}Expand description
The specification for the
child process. Mirrors
AcpStdioPeer::SpawnSpec so
the call sites that already
know that shape can swap.
Fields§
§command: StringThe executable to spawn.
args: Vec<String>The arguments to pass.
timeout: Option<Duration>The default request timeout.
Implementations§
Source§impl SpawnSpec
impl SpawnSpec
Sourcepub fn new(command: impl Into<String>, args: Vec<String>) -> Self
pub fn new(command: impl Into<String>, args: Vec<String>) -> Self
Construct a new SpawnSpec
for a command and its
arguments. The timeout
defaults to 30 seconds; the
consumer overrides it with
with_timeout.
Sourcepub const fn with_timeout(self, timeout: Duration) -> Self
pub const fn with_timeout(self, timeout: Duration) -> Self
Set the default request timeout.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpawnSpec
impl RefUnwindSafe for SpawnSpec
impl Send for SpawnSpec
impl Sync for SpawnSpec
impl Unpin for SpawnSpec
impl UnsafeUnpin for SpawnSpec
impl UnwindSafe for SpawnSpec
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