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§

source

fn write_str(&mut self, string: impl AsRef<str>) -> Result<()>

Writes the given string into this writer.

§Errors

If this writer fails to write the given string.

source

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.

source

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.

source

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.

source

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.

source

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.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T: Write + ?Sized> WriteStrExt for T