Struct dialogical::Interaction
source · pub struct Interaction {
pub id: String,
pub pages: Vec<Page>,
pub ending: DialogueEnding,
}Fields§
§id: String§pages: Vec<Page>§ending: DialogueEndingImplementations§
source§impl Interaction
impl Interaction
pub fn new_with_id(id: &str) -> Self
sourcepub fn push_goto(&mut self, goto: Label) -> ParseResult<()>
pub fn push_goto(&mut self, goto: Label) -> ParseResult<()>
Will try to push a goto, but error if there’s anything
besides an End currently set as the ending.
sourcepub fn push_choice(&mut self, to_push: DialogueChoice) -> ParseResult<()>
pub fn push_choice(&mut self, to_push: DialogueChoice) -> ParseResult<()>
Will try to either push onto the list or start a list. It will error if there’s currently a goto label.
Trait Implementations§
source§impl Clone for Interaction
impl Clone for Interaction
source§fn clone(&self) -> Interaction
fn clone(&self) -> Interaction
Returns a copy 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 Interaction
impl Debug for Interaction
source§impl<'de> Deserialize<'de> for Interaction
impl<'de> Deserialize<'de> for Interaction
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 PartialEq for Interaction
impl PartialEq for Interaction
source§fn eq(&self, other: &Interaction) -> bool
fn eq(&self, other: &Interaction) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for Interaction
impl Serialize for Interaction
impl StructuralPartialEq for Interaction
Auto Trait Implementations§
impl RefUnwindSafe for Interaction
impl Send for Interaction
impl Sync for Interaction
impl Unpin for Interaction
impl UnwindSafe for Interaction
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