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::{self, Write};
use crossterm::{execute, terminal::{EnterAlternateScreen, LeaveAlternateScreen}};
fn main() -> io::Result<()> {
execute!(io::stdout(), EnterAlternateScreen)?;
// Do anything on the alternate screen
execute!(io::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 for EnterAlternateScreen
impl PartialEq 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 ==
.impl Copy for EnterAlternateScreen
impl Eq for EnterAlternateScreen
impl StructuralPartialEq for EnterAlternateScreen
Auto Trait Implementations§
impl Freeze for EnterAlternateScreen
impl RefUnwindSafe for EnterAlternateScreen
impl Send for EnterAlternateScreen
impl Sync for EnterAlternateScreen
impl Unpin for EnterAlternateScreen
impl UnwindSafe for EnterAlternateScreen
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