Trait LocalName

Source
pub trait LocalName {
    const KEY: &'static str;

    // Provided methods
    fn local_name(lang: Lang, region: Option<Region>) -> &'static str { ... }
    fn local_name_in(styles: StyleChain<'_>) -> &'static str
       where Self: Sized { ... }
}
Expand description

The name with which an element is referenced.

Required Associated Constants§

Source

const KEY: &'static str

The key of an element in order to get its localized name.

Provided Methods§

Source

fn local_name(lang: Lang, region: Option<Region>) -> &'static str

Get the name in the given language and (optionally) region.

Source

fn local_name_in(styles: StyleChain<'_>) -> &'static str
where Self: Sized,

Gets the local name from the style chain.

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§

Source§

impl LocalName for Packed<EquationElem>

Source§

const KEY: &'static str = "equation"

Source§

impl LocalName for Packed<BibliographyElem>

Source§

const KEY: &'static str = "bibliography"

Source§

impl LocalName for Packed<HeadingElem>

Source§

const KEY: &'static str = "heading"

Source§

impl LocalName for Packed<OutlineElem>

Source§

const KEY: &'static str = "outline"

Source§

impl LocalName for Packed<TableElem>

Source§

const KEY: &'static str = "table"

Source§

impl LocalName for Packed<ImageElem>

Source§

const KEY: &'static str = "figure"

Source§

impl LocalName for Packed<RawElem>

Source§

const KEY: &'static str = "raw"

Source§

impl LocalName for PageElem

Source§

const KEY: &'static str = "page"