pub struct ProcessHandle { /* private fields */ }Expand description
Handle for interacting with a spawned process (PTY or pipe). Handle for driving an interactive process (PTY or pipe).
Implementations§
Source§impl ProcessHandle
impl ProcessHandle
Sourcepub fn writer_sender(&self) -> Sender<Vec<u8>>
pub fn writer_sender(&self) -> Sender<Vec<u8>>
Returns a channel sender for writing raw bytes to the child stdin.
Sourcepub fn has_exited(&self) -> bool
pub fn has_exited(&self) -> bool
True if the child process has exited.
Sourcepub fn resize(&self, size: TerminalSize) -> Result<()>
pub fn resize(&self, size: TerminalSize) -> Result<()>
Resize the PTY in character cells.
Sourcepub fn close_stdin(&self)
pub fn close_stdin(&self)
Close the child’s stdin channel.
Sourcepub fn request_terminate(&self)
pub fn request_terminate(&self)
Attempts to kill the child while leaving the reader/writer tasks alive so callers can still drain output until EOF.
pub fn signal(&self, signal: ProcessSignal) -> Result<()>
Trait Implementations§
Source§impl Debug for ProcessHandle
impl Debug for ProcessHandle
Source§impl Drop for ProcessHandle
impl Drop for ProcessHandle
Auto Trait Implementations§
impl !Freeze for ProcessHandle
impl RefUnwindSafe for ProcessHandle
impl Send for ProcessHandle
impl Sync for ProcessHandle
impl Unpin for ProcessHandle
impl UnsafeUnpin for ProcessHandle
impl UnwindSafe for ProcessHandle
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.