pub struct TestBackend { /* private fields */ }Expand description
In-memory terminal backend for testing.
All output is captured in a buffer that can be inspected.
Implementations§
Source§impl TestBackend
impl TestBackend
Sourcepub fn clear_buffer(&mut self)
pub fn clear_buffer(&mut self)
Clear the output buffer.
Sourcepub fn is_raw_mode(&self) -> bool
pub fn is_raw_mode(&self) -> bool
Check if raw mode is active.
Sourcepub fn is_mouse_enabled(&self) -> bool
pub fn is_mouse_enabled(&self) -> bool
Check if mouse capture is active.
Trait Implementations§
Source§impl Terminal for TestBackend
impl Terminal for TestBackend
Source§fn capabilities(&self) -> &TerminalCapabilities
fn capabilities(&self) -> &TerminalCapabilities
Get the terminal’s capabilities.
Source§fn enter_raw_mode(&mut self) -> Result<()>
fn enter_raw_mode(&mut self) -> Result<()>
Enter raw mode (disable line buffering, echo, etc.).
Source§fn exit_raw_mode(&mut self) -> Result<()>
fn exit_raw_mode(&mut self) -> Result<()>
Exit raw mode (restore normal terminal state).
Source§fn enable_mouse(&mut self) -> Result<()>
fn enable_mouse(&mut self) -> Result<()>
Enable mouse event capture.
Source§fn disable_mouse(&mut self) -> Result<()>
fn disable_mouse(&mut self) -> Result<()>
Disable mouse event capture.
Auto Trait Implementations§
impl Freeze for TestBackend
impl RefUnwindSafe for TestBackend
impl Send for TestBackend
impl Sync for TestBackend
impl Unpin for TestBackend
impl UnwindSafe for TestBackend
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