pub struct Shell {
pub history: ShellHistory,
/* private fields */
}
Expand description
§Shell
Shell represents the current user shell configuration
Fields§
§history: ShellHistory
Implementations§
Source§impl Shell
impl Shell
Sourcepub fn start(
exec: String,
args: Vec<String>,
prompt_config: &PromptConfig,
) -> Result<Shell, ShellError>
pub fn start( exec: String, args: Vec<String>, prompt_config: &PromptConfig, ) -> Result<Shell, ShellError>
§start
Start a new shell instance and instantiates a new Shell struct
Sourcepub fn read(&mut self) -> Result<(Option<String>, Option<String>), ShellError>
pub fn read(&mut self) -> Result<(Option<String>, Option<String>), ShellError>
§read
Mirrors ShellProc read
Sourcepub fn write(&mut self, input: String) -> Result<(), ShellError>
pub fn write(&mut self, input: String) -> Result<(), ShellError>
§write
Mirrors ShellProc write
Sourcepub fn raise(&mut self, sig: UnixSignal) -> Result<(), ShellError>
pub fn raise(&mut self, sig: UnixSignal) -> Result<(), ShellError>
§raise
Send a signal to shell process
Sourcepub fn get_state(&mut self) -> ShellState
pub fn get_state(&mut self) -> ShellState
§get_state
Returns the current Shell state
Sourcepub fn refresh_env(&mut self)
pub fn refresh_env(&mut self)
§refresh_env
Refresh Shell Environment information
Sourcepub fn get_promptline(&mut self, processor: &IOProcessor) -> String
pub fn get_promptline(&mut self, processor: &IOProcessor) -> String
§pprompt
Print prompt line
Auto Trait Implementations§
impl Freeze for Shell
impl RefUnwindSafe for Shell
impl Send for Shell
impl !Sync for Shell
impl Unpin for Shell
impl UnwindSafe for Shell
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