pub trait Prompt {
// Required method
fn raw(&self) -> &str;
// Provided method
fn styled(&self) -> &str { ... }
}Expand description
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§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".