Rant is a language for procedural text generation. It is designed to help you write more dynamic and expressive templates, dialogue, stories, names, test data, and much more.
For language documentation, see the Rant Reference.
All programs are run through a Rant context, represented by the
It allows you to execute Rant programs, define and retrieve global variables, manipulate the RNG, and compile Rant code.
You will notice that the
Err variant of the
Rant::compile* methods is
() instead of providing an error list. Instead,
errors and warnings are reported via implementors of the
Reporter trait, which allows the user to control what happens to messages emitted by the compiler.
Currently, Rant has two built-in
Reporter implementations: the unit type
You can also make your own custom reporters to suit your specific needs.
A Rant execution context.
Rant's "empty" value.
A function callable from Rant.
Provides options for customizing the creation of a
A compiled Rant program.
Error produced by indexing a RantValue.
Error produced by keying a RantValue.
Defines endpoint variants for Rant functions.
Represents "special" values; opaque data structures for various internal runtime uses.
A dynamically-typed Rant value.
A lightweight representation of a Rant value's type.
Error produced by a RantValue operator or conversion.
The build version according to the crate metadata at the time of compiling.
The Rant language version implemented by this library.
Trait for converting something to a Rant function.
Enables conversion from a
Converts from argument list to tuple of
Enables conversion from a native type to a
A reference-counting handle to a Rant function.
The result type used by Rant value index read operations.
The result type used by Rant value index write operations.
The result type used by Rant value key read operations.
The result type used by Rant value key write operations.
The result type used by Rant value operators and conversion.