pub struct I18nTool { /* private fields */ }Implementations§
Source§impl I18nTool
impl I18nTool
pub fn new() -> Self
pub fn set_default_locale(&mut self, locale: &str)
pub fn add(&mut self, locale: &str, key: &str, value: &str)
Sourcepub fn load_json(&mut self, locale: &str, json_str: &str) -> Result<()>
pub fn load_json(&mut self, locale: &str, json_str: &str) -> Result<()>
Loads flat or nested JSON into the specified locale. Nested objects will have their keys joined by dots (e.g. “greeting.hello”).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for I18nTool
impl RefUnwindSafe for I18nTool
impl Send for I18nTool
impl Sync for I18nTool
impl Unpin for I18nTool
impl UnsafeUnpin for I18nTool
impl UnwindSafe for I18nTool
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