Module yarnspinner::prelude

source ·
Expand description

Everything you need to get started using Yarn Spinner.

Macros§

Structs§

Enums§

  • The types of compilation that the compiler will do.
  • An event encountered while running Dialogue::continue_. A caller is expected to handle these events and act accordingly.
  • A value associated with a markup name.
  • Represents a Yarn value. The chosen variant corresponds to the last assignment of the value, with the type being inferred from the type checker.

Traits§

  • The return value of a [YarnFn]. See [YarnFn] for more information on the kinds of signatures that can be registered.
  • A trait for providing text to a Dialogue. The default implementation is StringTableTextProvider, which keeps the text for the base language, i.e. the language the Yarn files are written in, and the text for the currently selected translation in memory.
  • Provides a mechanism for storing and retrieving instances of the YarnValue type.
  • A trait for analysing a compiled Yarn program. Can be used by adding them to a Context with Context::add_analyser and then applied to a compiled Yarn program with Dialogue::analyse.
  • A function that can be registered into and called from Yarn. It must have the following properties:

Type Aliases§