pub struct DialogueOption {
pub text: String,
pub available: bool,
pub line_id: Option<String>,
pub tags: Vec<String>,
pub group: Option<String>,
pub spans: Vec<MarkupSpan>,
}Expand description
An option presented to the player.
Fields§
§text: StringDisplay text of the option (markup tags stripped, expressions evaluated).
available: boolWhether this option is currently available (guards that evaluate to false make it unavailable).
line_id: Option<String>If the option text was tagged with #line:<id>, the stable id (no line: prefix).
Trailing #tag metadata.
group: Option<String>If the option was tagged with #group:<name>, the group name for UI constraints (radio buttons, etc.).
spans: Vec<MarkupSpan>Inline markup spans over text, in source order.
Empty when the option text contains no markup tags.
Trait Implementations§
Source§impl Clone for DialogueOption
impl Clone for DialogueOption
Source§fn clone(&self) -> DialogueOption
fn clone(&self) -> DialogueOption
Returns a duplicate of the value. Read more
1.0.0 · 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 DialogueOption
impl Debug for DialogueOption
Source§impl PartialEq for DialogueOption
impl PartialEq for DialogueOption
impl Eq for DialogueOption
impl StructuralPartialEq for DialogueOption
Auto Trait Implementations§
impl Freeze for DialogueOption
impl RefUnwindSafe for DialogueOption
impl Send for DialogueOption
impl Sync for DialogueOption
impl Unpin for DialogueOption
impl UnsafeUnpin for DialogueOption
impl UnwindSafe for DialogueOption
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.