Struct Child
Source pub struct Child {
pub pid: u32,
}
Expand description
Blocks the plugin until the program exits; its exit status (a
signal is negated). Prefer awaiting
Event::ProcessExited.
examples/together_companion.rs (
line 45)
42async fn rebuild(cx: Context, builds: Rc<Cell<u32>>, running: Rc<Cell<bool>>) {
43 publish(&cx, "building", builds.get());
44 let passed = process::spawn("make", &[], None)
45 .and_then(|child| child.wait())
46 .is_ok_and(|status| status == 0);
47 builds.set(builds.get() + 1);
48 running.set(false);
49 publish(&cx, if passed { "passed" } else { "failed" }, builds.get());
50}
The exit status once the program exited.
Closes a piped stdin: the program reads end of file.
Kills the program’s process group.
Performs copy-assignment from
source.
Read more
Formats the value using the given formatter.
Read more
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more
Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
The type which is actually stored in-memory for this resource.
Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
Uses borrowed data to replace owned data, usually by cloning.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.