Skip to main content

PromptWriter

Trait PromptWriter 

Source
pub trait PromptWriter {
    // Required methods
    fn write(&mut self, text: &str);
    fn flush(&mut self) -> Result<()>;
}
Expand description

Abstraction over the output stream so prompts can capture their text.

Required Methods§

Source

fn write(&mut self, text: &str)

Buffers text for display.

Source

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

Flushes buffered text to the real output.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§