pub fn to_alternate(raw_mode: bool) -> Result<AlternateScreen> {
        let alternate = alternate::alternate_screen();
        alternate.enter()?;

        let mut alternate = AlternateScreen {
            alternate,
            raw_screen: None,
        };

        if raw_mode {
            // If into_raw_mode fails, `alternate` will be dropped and
            // we'll switch back to the main screen.
            alternate.raw_screen = Some(RawScreen::into_raw_mode()?);
        }

        Ok(alternate)
    }
/// Switches to the alternate screen.
///
/// # Arguments
///
/// * `raw_mode` - `true` enables the raw mode as well
///
/// # Notes
///
/// You'll be automatically switched to the main screen if this function
/// fails.
Switches to the alternate screen.
Switches to the alternate screen .
pub fn to_alternate(raw_mode: bool) -> Result<AlternateScreen> {
        let alternate = alternate::alternate_screen();
        alternate.enter()?;
        let mut alternate = AlternateScreen {
            alternate,
            raw_screen: None,
        };
        if raw_mode {
            // If into_raw_mode fails, `alternate` will be dropped and
            // we'll switch back to the main screen.
            alternate.raw_screen = Some(RawScreen::into_raw_mode()?);
        }
        Ok(alternate)
    }
pub fn to_alternate ( raw_mode : bool ) -> Result < AlternateScreen > { let alternate = alternate :: alternate_screen ( ) ; alternate . enter ( ) ? ; let mut alternate = AlternateScreen { alternate , raw_screen : None , } ; if raw_mode { // If into_raw_mode fails, `alternate` will be dropped and // we'll switch back to the main screen. alternate . raw_screen = Some ( RawScreen :: into_raw_mode ( ) ? ) ; } Ok ( alternate ) }
Switches to the alternate screen.
Switches to the alternate screen .
raw_mode
bool
raw_mode
bool
notes
You'll be automatically switched to the main screen if this function
fails.
You ' ll be automatically switched to the main screen if this function fails .