pub trait StyleSheet:
Clone
+ Send
+ Sync
+ 'static {
// Required methods
fn heading(&self, level: u8) -> Style;
fn code(&self) -> Style;
fn link(&self) -> Style;
fn blockquote(&self) -> Style;
fn heading_meta(&self) -> Style;
fn metadata_block(&self) -> Style;
}Expand description
A collection of ratatui_core::style::Styles consumed by the renderer.
The trait purposefully stays tiny: whenever the renderer needs a color choice we add a new
getter here. The default implementation maintains full backward-compatibility with the styles
that lived in the old mod styles.
Required Methods§
Sourcefn heading(&self, level: u8) -> Style
fn heading(&self, level: u8) -> Style
Style for a Markdown heading.
level is one-based (1 for # H1, …).
Sourcefn code(&self) -> Style
fn code(&self) -> Style
Style for inline code spans and fenced code blocks when syntax highlighting is disabled.
Sourcefn blockquote(&self) -> Style
fn blockquote(&self) -> Style
Base style applied to blockquotes (> prefix and body text).
Sourcefn heading_meta(&self) -> Style
fn heading_meta(&self) -> Style
Style for heading attribute metadata appended to the heading text.
Sourcefn metadata_block(&self) -> Style
fn metadata_block(&self) -> Style
Style for metadata blocks (front matter).
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.