pub struct SpawnedChild {
pub stdin: Option<ChildStdin>,
pub stdout: Option<ChildStdout>,
pub stderr: Option<ChildStderr>,
/* private fields */
}Expand description
Handle and optional parent pipe ends for a contained child.
Dropping this value shuts down the contained process group.
Fields§
§stdin: Option<ChildStdin>Writable parent end when standard input was configured as a pipe.
stdout: Option<ChildStdout>Readable parent end when standard output was configured as a pipe.
stderr: Option<ChildStderr>Readable parent end when standard error was configured as a pipe.
Implementations§
Source§impl SpawnedChild
impl SpawnedChild
Sourcepub fn from_parts(
pid: u32,
stdin: Option<ChildStdin>,
stdout: Option<ChildStdout>,
stderr: Option<ChildStderr>,
inner: Box<dyn SpawnedChildControl>,
) -> Self
pub fn from_parts( pid: u32, stdin: Option<ChildStdin>, stdout: Option<ChildStdout>, stderr: Option<ChildStderr>, inner: Box<dyn SpawnedChildControl>, ) -> Self
Transfer caller-owned pipes and lifecycle control into this handle.
This constructor does not launch a process or establish containment.
The caller must supply the matching PID, pipes, and control for an
already-contained child. Dropping the returned handle invokes
SpawnedChildControl::shutdown; the supplied control owns the actual
termination and reaping policy.
Trait Implementations§
Source§impl Drop for SpawnedChild
impl Drop for SpawnedChild
Auto Trait Implementations§
impl Freeze for SpawnedChild
impl RefUnwindSafe for SpawnedChild
impl Send for SpawnedChild
impl Sync for SpawnedChild
impl Unpin for SpawnedChild
impl UnsafeUnpin for SpawnedChild
impl UnwindSafe for SpawnedChild
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more