Struct crossterm::terminal::EnterAlternateScreen [−][src]
pub struct EnterAlternateScreen;
Expand description
A command that switches to alternate screen.
Notes
- Commands must be executed/queued for execution otherwise they do nothing.
- Use LeaveAlternateScreen command to leave the entered alternate screen.
Examples
use std::io::{stdout, Write};
use crossterm::{execute, Result, terminal::{EnterAlternateScreen, LeaveAlternateScreen}};
fn main() -> Result<()> {
execute!(stdout(), EnterAlternateScreen)?;
// Do anything on the alternate screen
execute!(stdout(), LeaveAlternateScreen)
}
Trait Implementations
Write an ANSI representation of this command to the given writer. An ANSI code can manipulate the terminal by writing it to the terminal buffer. However, only Windows 10 and UNIX systems support this. Read more
Auto Trait Implementations
impl RefUnwindSafe for EnterAlternateScreen
impl Send for EnterAlternateScreen
impl Sync for EnterAlternateScreen
impl Unpin for EnterAlternateScreen
impl UnwindSafe for EnterAlternateScreen
Blanket Implementations
Mutably borrows from an owned value. Read more