[−][src]Struct procspawn::JoinHandle
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
Auto Trait Implementations
impl<T> !RefUnwindSafe for JoinHandle<T>
impl<T> Send for JoinHandle<T> where
T: Send,
T: Send,
impl<T> !Sync for JoinHandle<T>
impl<T> Unpin for JoinHandle<T> where
T: Unpin,
T: Unpin,
impl<T> !UnwindSafe for JoinHandle<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,