pub struct Scene<D = NoDirective> {
pub id: String,
pub steps: Vec<Step<D>>,
}Expand description
One scene: @scene <id> … @end.
Fields§
§id: StringScene id, unique across every dialogue file.
steps: Vec<Step<D>>Its steps, in order.
Implementations§
Source§impl<D> Scene<D>
impl<D> Scene<D>
Sourcepub fn lines(&self) -> Vec<Line<'_>>
pub fn lines(&self) -> Vec<Line<'_>>
Every line that shows text (speech, narration, replies and the lines
of their reactions), in script order, whoever is there: both parts
of every @if block.
Sourcepub fn assign_line_ids(&mut self)
pub fn assign_line_ids(&mut self)
Gives every line of the scene its id, from the scene id, the speakers and the texts as they are now. The parser calls this on each scene it reads; call it after building or editing a scene by hand.
Trait Implementations§
Source§impl<'de, D> Deserialize<'de> for Scene<D>where
D: Deserialize<'de>,
impl<'de, D> Deserialize<'de> for Scene<D>where
D: Deserialize<'de>,
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
impl<D: Eq> Eq for Scene<D>
impl<D: PartialEq> StructuralPartialEq for Scene<D>
Auto Trait Implementations§
impl<D> Freeze for Scene<D>
impl<D> RefUnwindSafe for Scene<D>where
D: RefUnwindSafe,
impl<D> Send for Scene<D>where
D: Send,
impl<D> Sync for Scene<D>where
D: Sync,
impl<D> Unpin for Scene<D>where
D: Unpin,
impl<D> UnsafeUnpin for Scene<D>
impl<D> UnwindSafe for Scene<D>where
D: UnwindSafe,
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