Struct endbasic_std::testutils::MockConsole [−][src]
pub struct MockConsole { /* fields omitted */ }
Expand description
A console that supplies golden input and captures all output.
Implementations
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.
Adds a bunch of keys as golden input.
Obtains a reference to the captured output.
Sets whether the mock console is interactive or not.
Trait Implementations
Sets the console’s foreground and background colors to fg
and bg
. Read more
Hides the cursor.
Returns true if the console is attached to an interactive terminal. This controls whether reading a line echoes back user input, for example. Read more
Moves the cursor to the given position, which must be within the screen.
Moves the cursor within the line. Positive values move right, negative values move left.
Writes text
to the console, followed by a newline or CRLF pair depending on the needs of
the console to advance a line. Read more
Waits for and returns the next key press.
Shows the cursor.
Auto Trait Implementations
impl RefUnwindSafe for MockConsole
impl Send for MockConsole
impl Sync for MockConsole
impl Unpin for MockConsole
impl UnwindSafe for MockConsole