Trait cucumber::writer::out::WriteStrExt
source · pub trait WriteStrExt: Write {
// Provided methods
fn write_str(&mut self, string: impl AsRef<str>) -> Result<()> { ... }
fn write_line(&mut self, string: impl AsRef<str>) -> Result<()> { ... }
fn move_cursor_up(&mut self, n: usize) -> Result<()> { ... }
fn move_cursor_down(&mut self, n: usize) -> Result<()> { ... }
fn clear_last_lines(&mut self, n: usize) -> Result<()> { ... }
fn clear_line(&mut self) -> Result<()> { ... }
}
Expand description
io::Write
extension for easier manipulation with strings and special
sequences.
Provided Methods§
sourcefn write_line(&mut self, string: impl AsRef<str>) -> Result<()>
fn write_line(&mut self, string: impl AsRef<str>) -> Result<()>
Writes the given string
into this writer followed by a newline.
§Errors
If this writer fails to write the given string
.
sourcefn move_cursor_up(&mut self, n: usize) -> Result<()>
fn move_cursor_up(&mut self, n: usize) -> Result<()>
Writes a special sequence into this writer moving a cursor up on n
positions.
§Errors
If this writer fails to write a special sequence.
sourcefn move_cursor_down(&mut self, n: usize) -> Result<()>
fn move_cursor_down(&mut self, n: usize) -> Result<()>
Writes a special sequence into this writer moving a cursor down on n
positions.
§Errors
If this writer fails to write a special sequence.
sourcefn clear_last_lines(&mut self, n: usize) -> Result<()>
fn clear_last_lines(&mut self, n: usize) -> Result<()>
Writes a special sequence into this writer clearing the last n
lines.
NOTE: This method doesn’t clear the current line, only the n
lines
above it.
§Errors
If this writer fails to write a special sequence.
sourcefn clear_line(&mut self) -> Result<()>
fn clear_line(&mut self) -> Result<()>
Writes a special sequence into this writer clearing the last line.
§Errors
If this writer fails to write a special sequence.