pub trait Languages {
type Language: Language + ?Sized;
// Required methods
fn get(&self, lang: &str) -> Result<&Self::Language>;
fn get_mut(&mut self, lang: &str) -> Result<&mut Self::Language>;
// Provided method
fn canonical<'a>(&'a self, lang: &'a str) -> &'a str { ... }
}Required Associated Types§
Required Methods§
fn get(&self, lang: &str) -> Result<&Self::Language>
fn get_mut(&mut self, lang: &str) -> Result<&mut Self::Language>
Provided Methods§
Sourcefn canonical<'a>(&'a self, lang: &'a str) -> &'a str
fn canonical<'a>(&'a self, lang: &'a str) -> &'a str
The canonical registry key for lang, resolving aliases (python →
py); identity for unknown names. The machine park keys by this, so
Multi::machine hands the same machine to every alias.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".