pub struct Shell<'a> { /* private fields */ }Expand description
Interactive WhyOS shell loop.
Implementations§
Source§impl<'a> Shell<'a>
impl<'a> Shell<'a>
Sourcepub fn new(
input: &'a Queue<u8, BUFFER_SIZE>,
output_fn: OutputFn,
user_programs: &'a [Program],
) -> Self
pub fn new( input: &'a Queue<u8, BUFFER_SIZE>, output_fn: OutputFn, user_programs: &'a [Program], ) -> Self
Creates a new Shell.
Output function is then used as a callback by uprint! and uprintln! macros.
Provided user programs will be listed and executable along with builtin, example programs.
Sourcepub fn run(&mut self) -> !
pub fn run(&mut self) -> !
Runs the shell forever until the system stops the task.
Blocks waiting for data to be available in input queue.
Supports:
ENTER- attempts to parse and execute command stored inside the buffer.CTRL+C- attempts to kill the last executed program.BACKSPACE- removes the last character in buffer if available._- pushes the character into the buffer, if not full, checkBUFFER_SIZE.
Auto Trait Implementations§
impl<'a> Freeze for Shell<'a>
impl<'a> !RefUnwindSafe for Shell<'a>
impl<'a> Send for Shell<'a>
impl<'a> Sync for Shell<'a>
impl<'a> Unpin for Shell<'a>
impl<'a> UnsafeUnpin for Shell<'a>
impl<'a> !UnwindSafe for Shell<'a>
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