[][src]Struct procspawn::JoinHandle

pub struct JoinHandle<T> { /* fields omitted */ }

An owned permission to join on a process (block on its termination).

The join handle can be used to join a process but also provides the ability to kill it.

Methods

impl<T> JoinHandle<T>[src]

pub fn pid(&self) -> Option<u32>[src]

Returns the process ID if available.

The process ID is unavailable when pooled calls are not scheduled to processes.

pub fn kill(&mut self) -> Result<(), SpawnError>[src]

Kill the child process.

If the join handle was created from a pool this call will do one of two things depending on the situation:

  • if the call was already picked up by the process, the process will be killed.
  • if the call was not yet scheduled to a process it will be cancelled.

pub fn stdin(&mut self) -> Option<&mut ChildStdin>[src]

Fetch the stdin handle if it has been captured

pub fn stdout(&mut self) -> Option<&mut ChildStdout>[src]

Fetch the stdout handle if it has been captured

pub fn stderr(&mut self) -> Option<&mut ChildStderr>[src]

Fetch the stderr handle if it has been captured

impl<T: Serialize + DeserializeOwned> JoinHandle<T>[src]

pub fn join(self) -> Result<T, SpawnError>[src]

Wait for the child process to return a result.

If the join handle was created from a pool the join is virtualized.

pub fn join_timeout(self, timeout: Duration) -> Result<T, SpawnError>[src]

Like join but with a timeout.

Trait Implementations

impl<T> Debug for JoinHandle<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for JoinHandle<T>

impl<T> Send for JoinHandle<T> where
    T: Send

impl<T> !Sync for JoinHandle<T>

impl<T> Unpin for JoinHandle<T> where
    T: Unpin

impl<T> !UnwindSafe for JoinHandle<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,