Enum veloren_common_i18n::Content
source · pub enum Content {
Plain(String),
Key(String),
Attr(String, String),
Localized {
key: String,
seed: u16,
args: HashMap<String, LocalizationArg>,
},
}
Expand description
The type to represent generic localization request, to be sent from server to client and then localized (or internationalized) there.
Variants§
Plain(String)
Plain(text)
The content is a plaintext string that should be shown to the user verbatim.
Key(String)
Key(i18n_key)
The content is defined just by the key
Attr(String, String)
Attr(i18n_key, attr)
The content is the attribute of the key
Localized
Fields
§
seed: u16
Pseudorandom seed value that allows frontends to select a deterministic (but pseudorandom) localised output
§
args: HashMap<String, LocalizationArg>
i18n arguments
The content is a localizable message with the given arguments.
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Content
impl<'de> Deserialize<'de> for Content
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<Content> for LocalizationArg
impl From<Content> for LocalizationArg
source§impl PartialEq for Content
impl PartialEq for Content
impl StructuralPartialEq for Content
Auto Trait Implementations§
impl RefUnwindSafe for Content
impl Send for Content
impl Sync for Content
impl Unpin for Content
impl UnwindSafe for Content
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