pub struct MultiLanguageTranslationMap<K: Hash + PartialEq + Eq + Debug + Clone = String> { /* private fields */ }Implementations§
Source§impl MultiLanguageTranslationMap
impl MultiLanguageTranslationMap
pub fn new( source_path: &str, source_contents: &str, ) -> CountriesIso31661Result<Self>
Available on crate feature
std only.Sourcepub fn get_translation(
&self,
identifier: &str,
bcp47_code: &str,
) -> CountriesIso31661Result<String>
Available on crate feature std only.
pub fn get_translation( &self, identifier: &str, bcp47_code: &str, ) -> CountriesIso31661Result<String>
std only.Identifier and BCP-47 Code are case sensitive
Sourcepub fn identifier_index(&self) -> &HashMap<String, usize>
Available on crate feature std only.
pub fn identifier_index(&self) -> &HashMap<String, usize>
std only.If large_keys feature is enabled the result of this is a &HashMap<u64, usize>
pub fn bcp47_index(&self) -> &HashMap<String, usize>
Available on crate feature
std only.pub fn translations(&self) -> &[Vec<String>]
Available on crate feature
std only.Trait Implementations§
Source§impl<K: Clone + Hash + PartialEq + Eq + Debug + Clone> Clone for MultiLanguageTranslationMap<K>
Available on crate feature std only.
impl<K: Clone + Hash + PartialEq + Eq + Debug + Clone> Clone for MultiLanguageTranslationMap<K>
Available on crate feature
std only.Source§fn clone(&self) -> MultiLanguageTranslationMap<K>
fn clone(&self) -> MultiLanguageTranslationMap<K>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<K: Debug + Hash + PartialEq + Eq + Debug + Clone> Debug for MultiLanguageTranslationMap<K>
Available on crate feature std only.
impl<K: Debug + Hash + PartialEq + Eq + Debug + Clone> Debug for MultiLanguageTranslationMap<K>
Available on crate feature
std only.Source§impl<K: PartialEq + Hash + PartialEq + Eq + Debug + Clone> PartialEq for MultiLanguageTranslationMap<K>
Available on crate feature std only.
impl<K: PartialEq + Hash + PartialEq + Eq + Debug + Clone> PartialEq for MultiLanguageTranslationMap<K>
Available on crate feature
std only.Source§fn eq(&self, other: &MultiLanguageTranslationMap<K>) -> bool
fn eq(&self, other: &MultiLanguageTranslationMap<K>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<K: Eq + Hash + PartialEq + Eq + Debug + Clone> Eq for MultiLanguageTranslationMap<K>
Available on crate feature
std only.impl<K: Hash + PartialEq + Eq + Debug + Clone> StructuralPartialEq for MultiLanguageTranslationMap<K>
Available on crate feature
std only.Auto Trait Implementations§
impl<K> Freeze for MultiLanguageTranslationMap<K>
impl<K> RefUnwindSafe for MultiLanguageTranslationMap<K>where
K: RefUnwindSafe,
impl<K> Send for MultiLanguageTranslationMap<K>where
K: Send,
impl<K> Sync for MultiLanguageTranslationMap<K>where
K: Sync,
impl<K> Unpin for MultiLanguageTranslationMap<K>where
K: Unpin,
impl<K> UnsafeUnpin for MultiLanguageTranslationMap<K>
impl<K> UnwindSafe for MultiLanguageTranslationMap<K>where
K: UnwindSafe,
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