pub struct LocaleStringList {
pub default: Vec<String>,
pub variants: HashMap<String, Vec<String>>,
}
Expand description
A list of strings that can vary based on the system locale. Used for internationalized lists like keywords.
Fields§
§default: Vec<String>
The default list when no locale-specific variant is available
variants: HashMap<String, Vec<String>>
Map of locale codes to translated string lists
Implementations§
Source§impl LocaleStringList
impl LocaleStringList
Sourcepub fn get_variant(&self, locale: &str) -> &[String]
pub fn get_variant(&self, locale: &str) -> &[String]
Get the variant of the locale string, returns the default value if not found
Trait Implementations§
Source§impl Clone for LocaleStringList
impl Clone for LocaleStringList
Source§fn clone(&self) -> LocaleStringList
fn clone(&self) -> LocaleStringList
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for LocaleStringList
impl Debug for LocaleStringList
Source§impl Default for LocaleStringList
impl Default for LocaleStringList
Source§fn default() -> LocaleStringList
fn default() -> LocaleStringList
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LocaleStringList
impl RefUnwindSafe for LocaleStringList
impl Send for LocaleStringList
impl Sync for LocaleStringList
impl Unpin for LocaleStringList
impl UnwindSafe for LocaleStringList
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