Struct crossterm::terminal::EnterAlternateScreen
source · 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§
source§impl Clone for EnterAlternateScreen
impl Clone for EnterAlternateScreen
source§fn clone(&self) -> EnterAlternateScreen
fn clone(&self) -> EnterAlternateScreen
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Command for EnterAlternateScreen
impl Command for EnterAlternateScreen
source§impl Debug for EnterAlternateScreen
impl Debug for EnterAlternateScreen
source§impl PartialEq<EnterAlternateScreen> for EnterAlternateScreen
impl PartialEq<EnterAlternateScreen> for EnterAlternateScreen
source§fn eq(&self, other: &EnterAlternateScreen) -> bool
fn eq(&self, other: &EnterAlternateScreen) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.