pub struct RichTerminal { /* private fields */ }Expand description
A raw-mode Terminal that reads individual keys and redraws frames.
Render output is written to stderr, matching the stream prompts style against.
Implementations§
Trait Implementations§
Source§impl Drop for RichTerminal
impl Drop for RichTerminal
Source§impl Terminal for RichTerminal
impl Terminal for RichTerminal
Source§fn capabilities(&self) -> Capabilities
fn capabilities(&self) -> Capabilities
The interaction model this terminal supports.
Source§fn read_line(&mut self) -> AppResult<Option<String>>
fn read_line(&mut self) -> AppResult<Option<String>>
Read one whole line (line-driven terminals). Read more
Source§fn read_key(&mut self) -> AppResult<Key>
fn read_key(&mut self) -> AppResult<Key>
Read one decoded keystroke (key-driven terminals). Read more
Source§fn write(&mut self, text: &str) -> AppResult<()>
fn write(&mut self, text: &str) -> AppResult<()>
Write
text verbatim (no trailing newline). Read moreSource§fn write_line(&mut self, text: &str) -> AppResult<()>
fn write_line(&mut self, text: &str) -> AppResult<()>
Write
text followed by a newline (a carriage return + line feed in raw
mode). Read moreSource§fn clear_last_lines(&mut self, count: u16) -> AppResult<()>
fn clear_last_lines(&mut self, count: u16) -> AppResult<()>
Move the cursor up
count lines and clear from there down, so the next
frame overwrites the previous one. A no-op for line-driven terminals. Read moreAuto Trait Implementations§
impl Freeze for RichTerminal
impl RefUnwindSafe for RichTerminal
impl Send for RichTerminal
impl Sync for RichTerminal
impl Unpin for RichTerminal
impl UnsafeUnpin for RichTerminal
impl UnwindSafe for RichTerminal
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