pub enum Line {
Text {
text: String,
tags: Vec<String>,
},
Done {
text: String,
tags: Vec<String>,
},
Choices {
text: String,
tags: Vec<String>,
choices: Vec<Choice>,
},
End {
text: String,
tags: Vec<String>,
},
}Expand description
A single step of story output from Story::continue_single.
The enum tells the caller what to do next:
Text— more output may follow, keep callingcontinue_single.Done— this turn’s output is complete. Callcontinue_singleagain for the next turn (the story isn’t over).Choices— pick a choice viaStory::choose, then resume.End— the story has permanently ended.
Variants§
Text
One line of story content. More may follow — keep calling
Story::continue_single.
Done
This turn’s output is complete (ink -> DONE). The story isn’t
over — call Story::continue_single again for more.
Choices
The story is presenting choices. Call Story::choose then
resume with Story::continue_single.
End
The story has permanently ended (ink -> END).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Line
impl RefUnwindSafe for Line
impl Send for Line
impl Sync for Line
impl Unpin for Line
impl UnsafeUnpin for Line
impl UnwindSafe for Line
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