pub struct TestTerminal { /* private fields */ }Expand description
In-memory terminal double for testing.
Records all writes, cursor moves, and cursor visibility changes so tests can assert on the exact ANSI sequences emitted by the renderer.
Implementations§
Source§impl TestTerminal
impl TestTerminal
Sourcepub fn written(&self) -> &Vec<String>
pub fn written(&self) -> &Vec<String>
All strings written via Terminal::write since creation.
Sourcepub fn cursor_moves(&self) -> &Vec<(u16, u16)>
pub fn cursor_moves(&self) -> &Vec<(u16, u16)>
All cursor positions passed to Terminal::move_cursor since creation.
Whether the cursor was most recently hidden.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TestTerminal
impl RefUnwindSafe for TestTerminal
impl Send for TestTerminal
impl Sync for TestTerminal
impl Unpin for TestTerminal
impl UnsafeUnpin for TestTerminal
impl UnwindSafe for TestTerminal
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