pub struct Pty { /* private fields */ }
Expand description
Pty struct that encapsulates pid of our tty DOES NOT close pty on drop() ONLY on Pty::kill() this is so that a pty process can outlive this struct
Implementations§
Source§impl Pty
impl Pty
Sourcepub fn spawn<F, G>(on_read: F, on_death: G) -> Result<Pty, Box<dyn Error>>
pub fn spawn<F, G>(on_read: F, on_death: G) -> Result<Pty, Box<dyn Error>>
Spawns a new pty, on_read: callback called when there is something to read on_death: callback called when there the pty dies
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Pty
impl RefUnwindSafe for Pty
impl Send for Pty
impl Sync for Pty
impl Unpin for Pty
impl UnwindSafe for Pty
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