Struct termfest::ScreenLock
source · pub struct ScreenLock<'a> { /* private fields */ }
Expand description
ScreenLock
is a locked screen buffer, created by Termfest::lock_screen
.
When it is dropped, the buffered state will be flushed to the terminal.
All rendering manipulation is implemented in ScreenLock
.
Implementations
sourceimpl<'a> ScreenLock<'a>
impl<'a> ScreenLock<'a>
sourcepub fn flush(&mut self) -> Result<()>
pub fn flush(&mut self) -> Result<()>
flushes the internal buffer states to the terminal.
Even if this function is not called, the buffer will be flushed when self
is dropped.
sourcepub fn clear(&mut self)
pub fn clear(&mut self)
clear the internal buffer states. If clear and flush is called, the terminal will be cleared (nothing will be rendered).
pub fn move_cursor(&mut self, x: usize, y: usize)
pub fn hide_cursor(&mut self)
pub fn show_cursor(&mut self)
sourcepub fn print(&mut self, x: usize, y: usize, s: &str, attr: Attribute)
pub fn print(&mut self, x: usize, y: usize, s: &str, attr: Attribute)
print string with the given attribute.
It is equal to put_cell
calls with each character.
pub fn put_cell(&mut self, x: usize, y: usize, cell: Cell)
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for ScreenLock<'a>
impl<'a> !Send for ScreenLock<'a>
impl<'a> Sync for ScreenLock<'a>
impl<'a> Unpin for ScreenLock<'a>
impl<'a> UnwindSafe for ScreenLock<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more