LockableStream

Trait LockableStream 

Source
pub trait LockableStream: CLIStream {
    // Required method
    fn lock<'a>(&'a self) -> Box<dyn CLIStream + 'a>;
}
Expand description

A CLIStream that can be locked for synchronized access.

Required Methods§

Source

fn lock<'a>(&'a self) -> Box<dyn CLIStream + 'a>

Lock the stream, returning a writable guard.

Trait Implementations§

Source§

impl CLIStream for Box<dyn LockableStream>

Source§

fn rewind_lines(&mut self, count: u16) -> Result<()>

“Rewind” the stream so that the last count lines can be overwritten. Read more
Source§

fn get_size(&self) -> WinSize

The size of the command-line window. Read more
Source§

impl Stream for Box<dyn LockableStream>

Source§

fn reset(&mut self) -> Result<()>

Return color and emphasis to the default.
Source§

fn fg(&mut self, fg: Color) -> Result<()>

Change the foreground color.
Source§

fn em(&mut self) -> Result<()>

Begin emphasized text. Read more
Source§

fn is_cli(&self) -> bool

True if the stream is connected to a command-line interface.

Implementors§