Trait Prompt
pub trait Prompt
Provide two versions of the prompt:
- the
rawversion used whenstdoutis not a tty, or when the terminal is not supported or inNO_COLORmode - the
styledversion
Required Methods
fn raw(&self) -> &strNo style, no ANSI escape sequence
Provided Methods
fn styled(&self) -> &strWith style(s), ANSI escape sequences
Currently, the styled version must have the same display width as the raw version.
By default, returns the raw string.