pub struct ShellProc {
pub state: ShellProcState,
pub exit_status: u8,
pub pid: i32,
pub wrkdir: PathBuf,
pub exec_time: Duration,
/* private fields */
}
Expand description
§ShellProc
Shell Proc represents an instance of the shell process wrapper
Fields§
§state: ShellProcState
§exit_status: u8
§pid: i32
§wrkdir: PathBuf
§exec_time: Duration
Implementations§
Source§impl ShellProc
impl ShellProc
Sourcepub fn cleanup(&mut self) -> Result<u8, ShellError>
pub fn cleanup(&mut self) -> Result<u8, ShellError>
§cleanup
cleanup shell once exited. Returns the shell exit code
Sourcepub fn read(&mut self) -> Result<(Option<String>, Option<String>), ShellError>
pub fn read(&mut self) -> Result<(Option<String>, Option<String>), ShellError>
§read
Read from child pipes
Sourcepub fn write(&mut self, data: String) -> Result<(), ShellError>
pub fn write(&mut self, data: String) -> Result<(), ShellError>
§write
Write to child process stdin
Sourcepub fn update_state(&mut self) -> ShellProcState
pub fn update_state(&mut self) -> ShellProcState
§update_state
Update shell running state checking if the other thread has terminated
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ShellProc
impl RefUnwindSafe for ShellProc
impl Send for ShellProc
impl Sync for ShellProc
impl Unpin for ShellProc
impl UnwindSafe for ShellProc
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