pub struct MoveCursorToPreviousLine(pub u16);
Expand description
Moves the cursor to beginning of line the given number of lines up.
§Examples
use std::io::{stdout, Write};
use anes::MoveCursorToPreviousLine;
let mut stdout = stdout();
// Move cursor up by 2 rows and the move it to the first column
write!(stdout, "{}", MoveCursorToPreviousLine(2));
The previous example does the same thing as the following one:
use std::io::{stdout, Write};
use anes::{MoveCursorUp, MoveCursorToColumn};
let mut stdout = stdout();
write!(stdout, "{}{}", MoveCursorUp(2), MoveCursorToColumn(1));
Tuple Fields§
§0: u16
Trait Implementations§
Source§impl Clone for MoveCursorToPreviousLine
impl Clone for MoveCursorToPreviousLine
Source§fn clone(&self) -> MoveCursorToPreviousLine
fn clone(&self) -> MoveCursorToPreviousLine
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 MoveCursorToPreviousLine
impl Debug for MoveCursorToPreviousLine
Source§impl Display for MoveCursorToPreviousLine
impl Display for MoveCursorToPreviousLine
Source§impl Hash for MoveCursorToPreviousLine
impl Hash for MoveCursorToPreviousLine
Source§impl PartialEq for MoveCursorToPreviousLine
impl PartialEq for MoveCursorToPreviousLine
impl Copy for MoveCursorToPreviousLine
impl Eq for MoveCursorToPreviousLine
impl StructuralPartialEq for MoveCursorToPreviousLine
Auto Trait Implementations§
impl Freeze for MoveCursorToPreviousLine
impl RefUnwindSafe for MoveCursorToPreviousLine
impl Send for MoveCursorToPreviousLine
impl Sync for MoveCursorToPreviousLine
impl Unpin for MoveCursorToPreviousLine
impl UnwindSafe for MoveCursorToPreviousLine
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,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 2 bytes