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§fn write_ansi(&self, f: &mut impl Write) -> Result
fn write_ansi(&self, f: &mut impl Write) -> Result
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
source§fn is_ansi_code_supported(&self) -> bool
fn is_ansi_code_supported(&self) -> bool
Returns whether the ANSI code representation of this command is supported by windows. Read more
source§impl Debug for EnterAlternateScreen
impl Debug for EnterAlternateScreen
source§impl PartialEq for EnterAlternateScreen
impl PartialEq for EnterAlternateScreen
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)