Expand description
This is a dummy UI. That means it simulates an UI without interfacing with any users.
How to use:
- Put the input to simulate line-by-line in the input variable.
- If you want output from print commands put the UI to print with in print_ui.
Fields
input: VecDeque<String>print_ui: Option<&'a mut dyn UI>Trait Implementations
sourceimpl<'a> UI for DummyUI<'a>
impl<'a> UI for DummyUI<'a>
sourcefn get_command(
&mut self,
_ed: EdState<'_>,
_prefix: Option<char>
) -> Result<String, &'static str>
fn get_command(
&mut self,
_ed: EdState<'_>,
_prefix: Option<char>
) -> Result<String, &'static str>
Get a command for parsing and execution Read more
sourcefn get_input(
&mut self,
_ed: EdState<'_>,
terminator: char
) -> Result<Vec<String>, &'static str>
fn get_input(
&mut self,
_ed: EdState<'_>,
terminator: char
) -> Result<Vec<String>, &'static str>
Get input lines until given character is entered alone on a line Read more
Auto Trait Implementations
impl<'a> !RefUnwindSafe for DummyUI<'a>
impl<'a> !Send for DummyUI<'a>
impl<'a> !Sync for DummyUI<'a>
impl<'a> Unpin for DummyUI<'a>
impl<'a> !UnwindSafe for DummyUI<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more