#[non_exhaustive]pub enum DialogueEvent {
NodeStarted(String),
Line {
speaker: Option<String>,
text: String,
line_id: Option<String>,
tags: Vec<String>,
},
Options(Vec<DialogueOption>),
Command {
name: String,
args: Vec<String>,
tags: Vec<String>,
},
NodeComplete(String),
DialogueComplete,
}Expand description
Events emitted by crate::Runner one at a time via crate::Runner::next_event.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NodeStarted(String)
A node has started executing.
Line
A line of dialogue ready to display.
Fields
Trailing #tag metadata.
Options(Vec<DialogueOption>)
A set of options for the player to choose from.
Command
A host command to execute.
Fields
Trailing tags.
NodeComplete(String)
The current node has finished.
DialogueComplete
All dialogue has finished.
Trait Implementations§
Source§impl Clone for DialogueEvent
impl Clone for DialogueEvent
Source§fn clone(&self) -> DialogueEvent
fn clone(&self) -> DialogueEvent
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 DialogueEvent
impl Debug for DialogueEvent
Source§impl PartialEq for DialogueEvent
impl PartialEq for DialogueEvent
impl StructuralPartialEq for DialogueEvent
Auto Trait Implementations§
impl Freeze for DialogueEvent
impl RefUnwindSafe for DialogueEvent
impl Send for DialogueEvent
impl Sync for DialogueEvent
impl Unpin for DialogueEvent
impl UnsafeUnpin for DialogueEvent
impl UnwindSafe for DialogueEvent
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