pub struct ScreenContext { /* private fields */ }Expand description
A context that enters the alternate screen buffer, provides an update
method to display content, and automatically exits the alternate screen
buffer on drop.
Created via Console::screen().
§Example
ⓘ
let mut console = Console::new();
let ctx = console.screen();
ctx.update("Hello from alt-screen!");
std::thread::sleep(std::time::Duration::from_secs(2));
// ctx drops → exits alt screenImplementations§
Source§impl ScreenContext
impl ScreenContext
Trait Implementations§
Source§impl Debug for ScreenContext
impl Debug for ScreenContext
Source§impl Default for ScreenContext
impl Default for ScreenContext
Source§impl Drop for ScreenContext
impl Drop for ScreenContext
Auto Trait Implementations§
impl Freeze for ScreenContext
impl RefUnwindSafe for ScreenContext
impl Send for ScreenContext
impl Sync for ScreenContext
impl Unpin for ScreenContext
impl UnsafeUnpin for ScreenContext
impl UnwindSafe for ScreenContext
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