pub struct View<'a, S> {
pub left: Option<Portrait<'a>>,
pub right: Option<Portrait<'a>>,
pub speaker: Option<Side>,
pub text: Option<Cow<'a, str>>,
pub caption: Option<Cow<'a, str>>,
pub stage: &'a S,
pub narration: bool,
pub choices: Option<Vec<Cow<'a, str>>>,
}Expand description
What the screen shows for the current text box, with the game’s tokens filled in.
Fields§
§left: Option<Portrait<'a>>The left portrait, if any.
right: Option<Portrait<'a>>The right portrait, if any.
speaker: Option<Side>Which side is speaking (None for narration, or when finished).
text: Option<Cow<'a, str>>The text box’s text (None once the scene is finished). While a
choice is open, the text box before it (the line being answered).
caption: Option<Cow<'a, str>>The location/time caption, if one has been shown.
stage: &'a SWhat the game’s own lines have set so far.
narration: boolWhether the text is narration (no speaker).
choices: Option<Vec<Cow<'a, str>>>The lead’s replies, in menu order, while a choice is open: pick
one with DialoguePlayer::choose.
Trait Implementations§
impl<'a, S: Eq> Eq for View<'a, S>
impl<'a, S: PartialEq> StructuralPartialEq for View<'a, S>
Auto Trait Implementations§
impl<'a, S> Freeze for View<'a, S>
impl<'a, S> RefUnwindSafe for View<'a, S>where
S: RefUnwindSafe,
impl<'a, S> Send for View<'a, S>where
S: Sync,
impl<'a, S> Sync for View<'a, S>where
S: Sync,
impl<'a, S> Unpin for View<'a, S>
impl<'a, S> UnsafeUnpin for View<'a, S>
impl<'a, S> UnwindSafe for View<'a, S>where
S: RefUnwindSafe,
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