pub struct LocalizedString { /* private fields */ }Expand description
Represents a string that can be localized into different languages.
Constructed with LocalizedStringBuilder.
The contents are stored in an Arc<T> so it’s cheap to clone.
Implementations§
Source§impl LocalizedString
impl LocalizedString
Sourcepub fn resolve(
&self,
translation_map: &TranslationMap,
) -> MappedRwLockReadGuard<'_, str>
pub fn resolve( &self, translation_map: &TranslationMap, ) -> MappedRwLockReadGuard<'_, str>
Resolves the string against the translation map
Trait Implementations§
Source§impl Clone for LocalizedString
impl Clone for LocalizedString
Source§fn clone(&self) -> LocalizedString
fn clone(&self) -> LocalizedString
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 moreSource§impl Debug for LocalizedString
impl Debug for LocalizedString
Source§impl From<LocalizedString> for UIString
impl From<LocalizedString> for UIString
Source§fn from(value: LocalizedString) -> Self
fn from(value: LocalizedString) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for LocalizedString
impl !UnwindSafe for LocalizedString
impl Freeze for LocalizedString
impl Send for LocalizedString
impl Sync for LocalizedString
impl Unpin for LocalizedString
impl UnsafeUnpin for LocalizedString
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