pub enum Label {
Key {
key: String,
args: Vec<(String, String)>,
},
Text(String),
}Expand description
Text a view holds before it is shown: a text key with the values of
its placeholders, put in the player’s language by the skin when it
paints (Ctx::label), or text as it is. Logic that
doesn’t know the player’s language builds views of keys, and they need
no rebuilding when the language changes.
Variants§
Key
The text for key in the player’s language, with each {name} that
args names filled by its value (and keys’ names filled as
Ctx::text_with fills them).
Fields
Text(String)
Text shown as it is: a name the player typed, a number, text the caller has already translated.
Implementations§
Trait Implementations§
impl Eq for Label
impl StructuralPartialEq for Label
Auto Trait Implementations§
impl Freeze for Label
impl RefUnwindSafe for Label
impl Send for Label
impl Sync for Label
impl Unpin for Label
impl UnsafeUnpin for Label
impl UnwindSafe for Label
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