pub struct LocalizationHolder {
pub bundles: HashMap<String, FluentBundle<Arc<FluentResource>, IntlLangMemoizer>>,
pub default_language: String,
}
Expand description
Holder to hold all the loaded bundled for localizations, as well as the currently configured default language
Fields§
§bundles: HashMap<String, FluentBundle<Arc<FluentResource>, IntlLangMemoizer>>
§default_language: String
Implementations§
Source§impl LocalizationHolder
impl LocalizationHolder
pub fn load() -> Result<Self>
pub fn get_bundle( &self, language: &str, ) -> &FluentBundle<Arc<FluentResource>, IntlLangMemoizer>
pub fn get_default_bundle( &self, ) -> &FluentBundle<Arc<FluentResource>, IntlLangMemoizer>
Auto Trait Implementations§
impl Freeze for LocalizationHolder
impl !RefUnwindSafe for LocalizationHolder
impl Send for LocalizationHolder
impl Sync for LocalizationHolder
impl Unpin for LocalizationHolder
impl !UnwindSafe for LocalizationHolder
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