Skip to main content

ScriptsCheck

Struct ScriptsCheck 

Source
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>

Source

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.

Source

pub fn unchecked(&self) -> usize

How many scenes are left to check.

Source

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.

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.