pub struct SaveCursorPosition;
Expand description
Saves the cursor position.
Use the RestoreCursorPosition
sequence to
restore the cursor position.
§Examples
use std::io::{stdout, Write};
use anes::{SaveCursorPosition, RestoreCursorPosition};
let mut stdout = stdout();
// Save cursor position
write!(stdout, "{}", SaveCursorPosition);
// Your app
// Restore cursor position
write!(stdout, "{}", RestoreCursorPosition);
Trait Implementations§
Source§impl Clone for SaveCursorPosition
impl Clone for SaveCursorPosition
Source§fn clone(&self) -> SaveCursorPosition
fn clone(&self) -> SaveCursorPosition
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 Debug for SaveCursorPosition
impl Debug for SaveCursorPosition
Source§impl Display for SaveCursorPosition
impl Display for SaveCursorPosition
Source§impl Hash for SaveCursorPosition
impl Hash for SaveCursorPosition
Source§impl PartialEq for SaveCursorPosition
impl PartialEq for SaveCursorPosition
impl Copy for SaveCursorPosition
impl Eq for SaveCursorPosition
impl StructuralPartialEq for SaveCursorPosition
Auto Trait Implementations§
impl Freeze for SaveCursorPosition
impl RefUnwindSafe for SaveCursorPosition
impl Send for SaveCursorPosition
impl Sync for SaveCursorPosition
impl Unpin for SaveCursorPosition
impl UnwindSafe for SaveCursorPosition
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