pub trait Styleable: Display {
Show 17 methods
// Required method
fn style_with(&self, styler: impl Styler) -> StyledString;
// Provided methods
fn error(&self) -> StyledString { ... }
fn warning(&self) -> StyledString { ... }
fn success(&self) -> StyledString { ... }
fn info(&self) -> StyledString { ... }
fn emphasis(&self) -> StyledString { ... }
fn code(&self) -> StyledString { ... }
fn normal(&self) -> StyledString { ... }
fn subtle(&self) -> StyledString { ... }
fn hint(&self) -> StyledString { ... }
fn debug(&self) -> StyledString { ... }
fn link(&self) -> StyledString { ... }
fn quote(&self) -> StyledString { ... }
fn commentary(&self) -> StyledString { ... }
fn heading1(&self) -> StyledString { ... }
fn heading2(&self) -> StyledString { ... }
fn heading3(&self) -> StyledString { ... }
}Expand description
Required Methods§
Sourcefn style_with(&self, styler: impl Styler) -> StyledString
fn style_with(&self, styler: impl Styler) -> StyledString
Style this text using the given styler, returning a StyledString
Provided Methods§
Sourcefn error(&self) -> StyledString
fn error(&self) -> StyledString
Style this text as an error message
Sourcefn warning(&self) -> StyledString
fn warning(&self) -> StyledString
Style this text as a warning message
Sourcefn success(&self) -> StyledString
fn success(&self) -> StyledString
Style this text as a success message
Sourcefn info(&self) -> StyledString
fn info(&self) -> StyledString
Style this text as an informational message
Sourcefn emphasis(&self) -> StyledString
fn emphasis(&self) -> StyledString
Style this text as emphasized text
Sourcefn code(&self) -> StyledString
fn code(&self) -> StyledString
Style this text as code
Sourcefn normal(&self) -> StyledString
fn normal(&self) -> StyledString
Style this text as normal text
Sourcefn subtle(&self) -> StyledString
fn subtle(&self) -> StyledString
Style this text as subtle text
Sourcefn hint(&self) -> StyledString
fn hint(&self) -> StyledString
Style this text as hint text
Sourcefn debug(&self) -> StyledString
fn debug(&self) -> StyledString
Style this text as debug information
Sourcefn link(&self) -> StyledString
fn link(&self) -> StyledString
Style this text as a link
Sourcefn quote(&self) -> StyledString
fn quote(&self) -> StyledString
Style this text as quoted content
Sourcefn commentary(&self) -> StyledString
fn commentary(&self) -> StyledString
Style this text as commentary or explanatory notes
Sourcefn heading1(&self) -> StyledString
fn heading1(&self) -> StyledString
Style this text as a primary heading
Sourcefn heading2(&self) -> StyledString
fn heading2(&self) -> StyledString
Style this text as a secondary heading
Sourcefn heading3(&self) -> StyledString
fn heading3(&self) -> StyledString
Style this text as a tertiary heading
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.