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
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 Freeze for Content
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more