Skip to main content

DefaultStyleSheet

Struct DefaultStyleSheet 

Source
pub struct DefaultStyleSheet;
Expand description

The default style set

This style sheet will be used by default if the user does not provide their own implementation.

Styles are:

  • H1: white on cyan, bold, underlined
  • H2: cyan, bold
  • H3: cyan, bold, italic
  • H4-H6: light cyan, italic
  • code: white on black
  • link: blue, underlined
  • blockquote: green
  • metadata block: light yellow
  • heading markers: one to six # characters
  • code block fences: three backticks
  • raw HTML: dim
  • inline math: magenta, italic
  • display math: magenta
  • footnote references: dim, italic
  • footnote definitions: dim
  • definition list terms: bold
  • definition list descriptions: the surrounding style
  • note alerts: blue
  • tip alerts: green
  • important alerts: magenta
  • warning alerts: yellow
  • caution alerts: red
  • table headers: bold cyan
  • table cells: the surrounding style
  • table borders: dark gray
  • image fallback text: dim and italic

Trait Implementations§

Source§

impl Clone for DefaultStyleSheet

Source§

fn clone(&self) -> DefaultStyleSheet

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for DefaultStyleSheet

Source§

impl Debug for DefaultStyleSheet

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DefaultStyleSheet

Source§

fn default() -> DefaultStyleSheet

Returns the “default value” for a type. Read more
Source§

impl StyleSheet for DefaultStyleSheet

Source§

fn heading(&self, level: u8) -> Style

Style for a Markdown heading. Read more
Source§

fn code(&self) -> Style

Style for inline code spans and fenced code blocks when syntax highlighting is disabled.
Style for an inline or reference link’s visible label and appended destination.
Source§

fn blockquote(&self) -> Style

Base style applied to blockquotes (> prefix and body text).
Source§

fn heading_meta(&self) -> Style

Style for heading attribute metadata appended to the heading text.
Source§

fn metadata_block(&self) -> Style

Style for metadata blocks (front matter).
Source§

fn heading_marker(&self, level: u8) -> &str

Marker displayed before a Markdown heading. Read more
Source§

fn code_block_fence(&self) -> &str

Delimiter displayed above and below block code. Read more
Source§

fn html(&self) -> Style

Style for raw HTML blocks and inline HTML tags.
Source§

fn math_inline(&self) -> Style

Style for inline math ($...$).
Source§

fn math_display(&self) -> Style

Style for display math ($$...$$).
Source§

fn footnote_ref(&self) -> Style

Style for footnote references, rendered as [label].
Source§

fn footnote_def(&self) -> Style

Style for footnote definitions, including the [label]: prefix.
Source§

fn definition_term(&self) -> Style

Style for definition list terms.
Source§

fn definition_description(&self) -> Style

Style for definition list descriptions, including the : prefix.
Source§

fn alert(&self, kind: AlertKind) -> Style

Style for a GFM alert heading and body. Read more
Source§

fn alert_icon(&self, kind: AlertKind) -> &str

Icon displayed before a GFM alert label. Read more
Source§

fn alert_label(&self, kind: AlertKind) -> &str

Label displayed after a GFM alert icon. Read more
Source§

fn table_header(&self) -> Style

Style patched onto cells in the table header row. Read more
Source§

fn table_cell(&self) -> Style

Style patched onto ordinary table cells. Read more
Source§

fn table_border(&self) -> Style

Style for the Unicode box-drawing characters around table cells. Read more
Source§

fn image_alt(&self) -> Style

Style for the [img] marker and text used to represent Markdown images. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more