pub struct MoveCursorToNextLine(pub u16);
Expand description
Moves the cursor to beginning of line the given number of lines down.
§Examples
use std::io::{stdout, Write};
use anes::MoveCursorToNextLine;
let mut stdout = stdout();
// Move cursor down by 2 rows and the move it to the first column
write!(stdout, "{}", MoveCursorToNextLine(2));
The previous example does the same thing as the following one:
use std::io::{stdout, Write};
use anes::{MoveCursorDown, MoveCursorToColumn};
let mut stdout = stdout();
write!(stdout, "{}{}", MoveCursorDown(2), MoveCursorToColumn(1));
Tuple Fields§
§0: u16
Trait Implementations§
Source§impl Clone for MoveCursorToNextLine
impl Clone for MoveCursorToNextLine
Source§fn clone(&self) -> MoveCursorToNextLine
fn clone(&self) -> MoveCursorToNextLine
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 MoveCursorToNextLine
impl Debug for MoveCursorToNextLine
Source§impl Display for MoveCursorToNextLine
impl Display for MoveCursorToNextLine
Source§impl Hash for MoveCursorToNextLine
impl Hash for MoveCursorToNextLine
Source§impl PartialEq for MoveCursorToNextLine
impl PartialEq for MoveCursorToNextLine
impl Copy for MoveCursorToNextLine
impl Eq for MoveCursorToNextLine
impl StructuralPartialEq for MoveCursorToNextLine
Auto Trait Implementations§
impl Freeze for MoveCursorToNextLine
impl RefUnwindSafe for MoveCursorToNextLine
impl Send for MoveCursorToNextLine
impl Sync for MoveCursorToNextLine
impl Unpin for MoveCursorToNextLine
impl UnwindSafe for MoveCursorToNextLine
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