pub trait StyleSheet:
Clone
+ Send
+ Sync
+ 'static {
Show 22 methods
// Provided 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 { ... }
fn heading_marker(&self, level: u8) -> &str { ... }
fn code_block_fence(&self) -> &str { ... }
fn html(&self) -> Style { ... }
fn math_inline(&self) -> Style { ... }
fn math_display(&self) -> Style { ... }
fn footnote_ref(&self) -> Style { ... }
fn footnote_def(&self) -> Style { ... }
fn definition_term(&self) -> Style { ... }
fn definition_description(&self) -> Style { ... }
fn alert(&self, kind: AlertKind) -> Style { ... }
fn alert_icon(&self, kind: AlertKind) -> &str { ... }
fn alert_label(&self, kind: AlertKind) -> &str { ... }
fn table_header(&self) -> Style { ... }
fn table_cell(&self) -> Style { ... }
fn table_border(&self) -> Style { ... }
fn image_alt(&self) -> Style { ... }
}Expand description
Visual styles and symbols consumed by the renderer.
Every method has a default, which DefaultStyleSheet uses unchanged. Implementations only
need to override the choices they want to customize.
Provided 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 link(&self) -> Style
fn link(&self) -> Style
Style for an inline or reference link’s visible label and appended destination.
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).
Sourcefn heading_marker(&self, level: u8) -> &str
fn heading_marker(&self, level: u8) -> &str
Marker displayed before a Markdown heading.
level is one-based (1 for an H1, …). The renderer adds one separating space after a
non-empty marker. Return an empty string to omit the marker and its separator.
Sourcefn code_block_fence(&self) -> &str
fn code_block_fence(&self) -> &str
Delimiter displayed above and below block code.
The renderer appends fenced-code info to the opening delimiter. Return an empty string to omit both delimiter lines.
Sourcefn math_inline(&self) -> Style
fn math_inline(&self) -> Style
Style for inline math ($...$).
Sourcefn math_display(&self) -> Style
fn math_display(&self) -> Style
Style for display math ($$...$$).
Sourcefn footnote_ref(&self) -> Style
fn footnote_ref(&self) -> Style
Style for footnote references, rendered as [label].
Sourcefn footnote_def(&self) -> Style
fn footnote_def(&self) -> Style
Style for footnote definitions, including the [label]: prefix.
Sourcefn definition_term(&self) -> Style
fn definition_term(&self) -> Style
Style for definition list terms.
Sourcefn definition_description(&self) -> Style
fn definition_description(&self) -> Style
Style for definition list descriptions, including the : prefix.
Sourcefn alert(&self, kind: AlertKind) -> Style
fn alert(&self, kind: AlertKind) -> Style
Style for a GFM alert heading and body.
The generated icon and label are bold in addition to this base style.
Sourcefn alert_icon(&self, kind: AlertKind) -> &str
fn alert_icon(&self, kind: AlertKind) -> &str
Icon displayed before a GFM alert label.
Return an empty string to render the label without an icon.
Sourcefn alert_label(&self, kind: AlertKind) -> &str
fn alert_label(&self, kind: AlertKind) -> &str
Label displayed after a GFM alert icon.
Return an empty string to render the icon without a label.
Sourcefn table_header(&self) -> Style
fn table_header(&self) -> Style
Style patched onto cells in the table header row.
Properties set by this style override the same properties in an inline style. The style
covers cell padding, while borders use Self::table_border.
Sourcefn table_cell(&self) -> Style
fn table_cell(&self) -> Style
Style patched onto ordinary table cells.
Properties set by this style override the same properties in an inline style. The style
covers cell padding, while borders use Self::table_border.
Sourcefn table_border(&self) -> Style
fn table_border(&self) -> Style
Style for the Unicode box-drawing characters around table cells.
This changes the presentation of the borders, not the box-drawing characters themselves.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".