pub struct TranslationMap {
pub locale: Option<String>,
pub entries: HashMap<String, String>,
}Expand description
An owned snapshot of a printer’s translation table.
Built by walking cpdb_printer_obj.translations once and copying every
(key, value) pair into Rust-owned Strings. After construction the
map holds no raw pointers and can be freely stored or sent across
threads.
Fields§
§locale: Option<String>The locale this map was captured for, when available.
entries: HashMap<String, String>Translation entries: source string → localised string.
Implementations§
Trait Implementations§
Source§impl Clone for TranslationMap
impl Clone for TranslationMap
Source§fn clone(&self) -> TranslationMap
fn clone(&self) -> TranslationMap
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 TranslationMap
impl Debug for TranslationMap
Source§impl Default for TranslationMap
impl Default for TranslationMap
Source§fn default() -> TranslationMap
fn default() -> TranslationMap
Returns the “default value” for a type. Read more
impl Eq for TranslationMap
Source§impl PartialEq for TranslationMap
impl PartialEq for TranslationMap
Source§fn eq(&self, other: &TranslationMap) -> bool
fn eq(&self, other: &TranslationMap) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TranslationMap
Auto Trait Implementations§
impl Freeze for TranslationMap
impl RefUnwindSafe for TranslationMap
impl Send for TranslationMap
impl Sync for TranslationMap
impl Unpin for TranslationMap
impl UnsafeUnpin for TranslationMap
impl UnwindSafe for TranslationMap
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