pub struct Localization { /* private fields */ }
Implementations§
Source§impl Localization
impl Localization
pub fn default_language(&self) -> Option<&str>
pub fn set_default_language(&mut self, value: Option<String>)
pub fn current_language(&self) -> Option<&str>
pub fn set_current_language(&mut self, value: Option<String>)
pub fn add_text(&mut self, id: &str, language: &str, text_format: &str)
pub fn remove_text(&mut self, id: &str, language: &str) -> bool
pub fn remove_text_all(&mut self, id: &str) -> bool
pub fn remove_language(&mut self, lang: &str)
pub fn find_text_format(&self, id: &str) -> Option<&str>
pub fn format_text( &self, id: &str, params: &[(&str, &str)], ) -> Result<String, String>
Trait Implementations§
Source§impl Default for Localization
impl Default for Localization
Source§fn default() -> Localization
fn default() -> Localization
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Localization
impl RefUnwindSafe for Localization
impl Send for Localization
impl Sync for Localization
impl Unpin for Localization
impl UnwindSafe for Localization
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