pub struct ScriptsCheck<D = NoDirective> { /* private fields */ }Expand description
scripts_from_parsed one scene at a time, for a game that must hand
control back to its platform between them (a handheld’s update
callback, which its OS ends when it runs too long): Self::new, then
Self::check_next as many times as Self::unchecked says, then
Self::finish. The scripts and the errors are the same.
Implementations§
Source§impl<D: Directive> ScriptsCheck<D>
impl<D: Directive> ScriptsCheck<D>
Sourcepub fn new(files: impl IntoIterator<Item = DialogueFile<D>>) -> Self
pub fn new(files: impl IntoIterator<Item = DialogueFile<D>>) -> Self
The check of the scenes of files (from the .dlg format Dlg,
in file order), none checked yet.
Sourcepub fn check_next(&mut self, rules: &impl SceneRules<D>)
pub fn check_next(&mut self, rules: &impl SceneRules<D>)
Checks the next scene with check_scene and the game’s own
SceneRules::scene_problems, if one is left.
Sourcepub fn finish(
self,
rules: &impl SceneRules<D>,
) -> Result<Scripts<D>, Vec<ContentError>>
pub fn finish( self, rules: &impl SceneRules<D>, ) -> Result<Scripts<D>, Vec<ContentError>>
Scripts of the scenes, or every problem with them, ordered by
file and line: those Self::check_next found, and the scene ids
across files. The scenes not checked yet are checked with rules
first.
§Errors
Every problem found, if there is one.
Auto Trait Implementations§
impl<D> Freeze for ScriptsCheck<D>
impl<D> RefUnwindSafe for ScriptsCheck<D>where
D: RefUnwindSafe,
impl<D> Send for ScriptsCheck<D>where
D: Send,
impl<D> Sync for ScriptsCheck<D>where
D: Sync,
impl<D> Unpin for ScriptsCheck<D>where
D: Unpin,
impl<D> UnsafeUnpin for ScriptsCheck<D>
impl<D> UnwindSafe for ScriptsCheck<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