pub struct Tip<T> {
pub id: String,
pub trigger: T,
pub title: String,
pub text: String,
pub how: Option<String>,
pub face: Option<String>,
}Expand description
One tip; T is the game’s triggers.
Fields§
§id: StringStable id (snake_case); what is remembered once the tip was seen.
trigger: TWhat makes it appear.
title: StringShown in the box’s border.
text: StringThe body: lines separated by \n, with {Action} placeholders
for key names.
how: Option<String>What to do, apart from the text: plain instructions, lines
separated by \n, with {Action} placeholders. Written how: "..."; None if the tip has none.
face: Option<String>The expression of whoever speaks the tip while it shows, if it
names one. Written face: "sad".
Implementations§
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for Tip<T>where
T: DeserializeOwned,
impl<'de, T> Deserialize<'de> for Tip<T>where
T: DeserializeOwned,
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
impl<T: Eq> Eq for Tip<T>
impl<T: PartialEq> StructuralPartialEq for Tip<T>
Auto Trait Implementations§
impl<T> Freeze for Tip<T>where
T: Freeze,
impl<T> RefUnwindSafe for Tip<T>where
T: RefUnwindSafe,
impl<T> Send for Tip<T>where
T: Send,
impl<T> Sync for Tip<T>where
T: Sync,
impl<T> Unpin for Tip<T>where
T: Unpin,
impl<T> UnsafeUnpin for Tip<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Tip<T>where
T: 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