pub struct MockUI {
pub prints_history: Vec<Print>,
}
Expand description
A mock UI that logs all prints and panics when asked for input.
Fields§
§prints_history: Vec<Print>
Trait Implementations§
Source§impl UI for MockUI
impl UI for MockUI
Source§fn print_message(&mut self, data: &str) -> Result<()>
fn print_message(&mut self, data: &str) -> Result<()>
A basic print for errors and other information messages
Source§fn print_command_documentation(&mut self) -> Result<()>
fn print_command_documentation(&mut self) -> Result<()>
Print commands documentation Read more
Source§fn print_selection(
&mut self,
ed: &Ed<'_>,
selection: (usize, usize),
numbered: bool,
literal: bool,
) -> Result<()>
fn print_selection( &mut self, ed: &Ed<'_>, selection: (usize, usize), numbered: bool, literal: bool, ) -> Result<()>
Print the given selection with the given options Read more
Source§fn get_command(&mut self, _ed: &Ed<'_>, _prefix: Option<char>) -> Result<String>
fn get_command(&mut self, _ed: &Ed<'_>, _prefix: Option<char>) -> Result<String>
Get a command for parsing and execution Read more
Source§fn get_input(&mut self, _ed: &Ed<'_>, _terminator: char) -> Result<Vec<String>>
fn get_input(&mut self, _ed: &Ed<'_>, _terminator: char) -> Result<Vec<String>>
Get input lines until given character is entered alone on a line Read more
Auto Trait Implementations§
impl Freeze for MockUI
impl RefUnwindSafe for MockUI
impl Send for MockUI
impl Sync for MockUI
impl Unpin for MockUI
impl UnwindSafe for MockUI
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