fix: expose TokioChildWrapper::id() in TokioChildProcess and TokioChildProcessOut (#254)
This commit is contained in:
parent
db03f63e76
commit
a55bbddcf1
1 changed files with 12 additions and 0 deletions
|
|
@ -48,6 +48,13 @@ pin_project_lite::pin_project! {
|
|||
}
|
||||
}
|
||||
|
||||
impl TokioChildProcessOut {
|
||||
/// Get the process ID of the child process.
|
||||
pub fn id(&self) -> Option<u32> {
|
||||
self.child.inner.id()
|
||||
}
|
||||
}
|
||||
|
||||
impl AsyncRead for TokioChildProcessOut {
|
||||
fn poll_read(
|
||||
self: std::pin::Pin<&mut Self>,
|
||||
|
|
@ -77,6 +84,11 @@ impl TokioChildProcess {
|
|||
})
|
||||
}
|
||||
|
||||
/// Get the process ID of the child process.
|
||||
pub fn id(&self) -> Option<u32> {
|
||||
self.child.inner.id()
|
||||
}
|
||||
|
||||
pub fn split(self) -> (TokioChildProcessOut, ChildStdin) {
|
||||
let TokioChildProcess {
|
||||
child,
|
||||
|
|
|
|||
Loading…
Reference in a new issue