pub struct LanguageRegistry {
pub default_language: String,
pub specs: HashMap<String, LanguageSpec>,
}Fields§
§default_language: String§specs: HashMap<String, LanguageSpec>Implementations§
Source§impl LanguageRegistry
impl LanguageRegistry
pub fn from_env_or_file() -> Self
pub fn resolve(&self, lang: Option<&str>) -> Option<ResolvedLanguage>
Trait Implementations§
Source§impl Clone for LanguageRegistry
impl Clone for LanguageRegistry
Source§fn clone(&self) -> LanguageRegistry
fn clone(&self) -> LanguageRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LanguageRegistry
impl RefUnwindSafe for LanguageRegistry
impl Send for LanguageRegistry
impl Sync for LanguageRegistry
impl Unpin for LanguageRegistry
impl UnsafeUnpin for LanguageRegistry
impl UnwindSafe for LanguageRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more