Skip to main content

Catalog

Trait Catalog 

pub trait Catalog:
    Catalog
    + Catalog
    + Catalog
    + Catalog
    + Catalog
    + Catalog
    + Clone
    + PartialEq {
    // Required methods
    fn id(&self) -> &str;
    fn link_color(&self) -> Color;
    fn code(&self) -> InlineCode;
    fn code_block<'a>() -> Self::Class<'a>;
    fn quote<'a>() -> Self::Class<'a>;
    fn highlighter(&self) -> &dyn Highlighter<Code, Self>;
}
Available on crate feature markdown only.
Expand description

The theme catalog of Markdown items.

Required Methods§

fn id(&self) -> &str

The unique identifier of the Catalog.

This will be used to invalidate span styling when a theme changes.

The Color of some link.

fn code(&self) -> InlineCode

The InlineCode style of some inline code.

fn code_block<'a>() -> Self::Class<'a>

The styling class of a code block.

fn quote<'a>() -> Self::Class<'a>

The styling class of a quote.

fn highlighter(&self) -> &dyn Highlighter<Code, Self>

The default text::Highlighter to use to highlight code.

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.

Implementors§

§

impl Catalog for Theme