Expand description
Provides common and re-usable types, including types that are conceptual to this library and its type model.
Provides common, re-usable types that work for any code generation purposes
Some of the types in this module are conceptual and are related to the library itself, like [NoOp] or [Combined]. Other types are syntax based, but their syntax is so general that they are useful for code generation in different languages.
Structs§
- ArrSeq
- A sequence based on an array of writable elements
- Boxed
Indirection - Runs the given writable or sequence, but places the future inside Box::pin. This layer of indirection helps to break recursion issues in async code.
- Combined
- A combined writable that simply writes its tuple values out
- Combined
Seq - A combined writable sequence that consists of two other sequences
- NoOp
- Empty writable
- NoOpSeq
- Empty writable sequence
- Repeat
Seq - A struct that repeats a value multiple times in order to turn it into a
WritableSeq. This struct is indeed a generalization ofSingularSeq(it’s equivalent when the count is 1). - Separated
SeqAccept - A general purpose sequence acceptor that tracks whether any element is written and can write a separator between each element, in addition to an optional intro at the beginning.
- Sequence
ViaConfig - A sequence implementation that takes elements in an array, and writes each element using the config. The config should implement SequenceConfig.
- Singular
Seq - A singular converts a
Writableinto a single-elementWritableSeqIts implementation just writes the tuple value. - Str
- Turns a string or a string reference into a writable value.
Can be used with str, String, or any type that implements
AsRef<str> - StrArr
Seq - Like ArrSeq, but specialized for string so that you don’t need to wrap each element in Str
- Surrounding
SeqAccept - A general purpose sequence acceptor that surrounds every element written with the “before” and “after” writable elements.
Traits§
- Sequence
Config - A helper object that writes other data, and not the object itself, on demand