Struct endbasic_std::testutils::MockConsole [−][src]
A console that supplies golden input and captures all output.
Implementations
impl MockConsole
[src]
pub fn add_input_chars(&mut self, s: &str)
[src]
Adds a bunch of characters as golden input keys.
Note that some escape characters within s
are interpreted and added as their
corresponding Key
s for simplicity.
pub fn add_input_keys(&mut self, keys: &[Key])
[src]
Adds a bunch of keys as golden input.
pub fn captured_out(&self) -> &[CapturedOut]
[src]
Obtains a reference to the captured output.
pub fn set_size(&mut self, size: Position)
[src]
Sets the size of the mock console.
Trait Implementations
impl Console for MockConsole
[src]
fn clear(&mut self, how: ClearType) -> Result<()>
[src]
fn color(&mut self, fg: Option<u8>, bg: Option<u8>) -> Result<()>
[src]
fn enter_alt(&mut self) -> Result<()>
[src]
fn hide_cursor(&mut self) -> Result<()>
[src]
fn is_interactive(&self) -> bool
[src]
fn leave_alt(&mut self) -> Result<()>
[src]
fn locate(&mut self, pos: Position) -> Result<()>
[src]
fn move_within_line(&mut self, off: i16) -> Result<()>
[src]
fn print(&mut self, text: &str) -> Result<()>
[src]
fn read_key<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Key>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Key>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn show_cursor(&mut self) -> Result<()>
[src]
fn size(&self) -> Result<Position>
[src]
fn write(&mut self, bytes: &[u8]) -> Result<()>
[src]
impl Default for MockConsole
[src]
impl Drop for MockConsole
[src]
Auto Trait Implementations
impl RefUnwindSafe for MockConsole
[src]
impl Send for MockConsole
[src]
impl Sync for MockConsole
[src]
impl Unpin for MockConsole
[src]
impl UnwindSafe for MockConsole
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,