Skip to main content

DictMulti

Type Alias DictMulti 

Source
pub type DictMulti = Multi<DictLanguages, DictMetaLanguages>;

Aliased Type§

pub struct DictMulti {
    pub langs: DictLanguages,
    pub metas: DictMetaLanguages,
    pub machines: Park,
}

Fields§

§langs: DictLanguages§metas: DictMetaLanguages§machines: Park

Live default machines, one per language, spawned on first use by machine — so successive reduces share definitions for as long as this Multi lives. See docs/design/machines.md.

Implementations§

Source§

impl DictMulti

Source

pub fn add_lang( &mut self, lang: &str, language: <DictLanguages as Languages>::Language, )

Source

pub fn add_meta( &mut self, lang: &str, meta: <DictMetaLanguages as MetaLanguages>::MetaLanguage, )

Source

pub fn add_alias(&mut self, alias: &str, canonical: &str)

Register alias as an alternate name for canonical in both the language and meta-language registries. Lookups under the alias resolve to the canonical entry’s instance (no entry there → “not found”).