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 [CombinedBody]. 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
- Combined
- A combined writable that simply writes its tuple values out
- CombinedSeq 
- A combined writable sequence that consists of two other sequences
- ExtractWritable 
- A wrapper intended to be used as a WritableDatumConfig. The tuple value should be a function that returns a writable for the data type.
- NoOp
- Empty writable
- NoOpSeq
- Empty writable sequence
- RepeatSeq 
- A struct that repeats a value multiple times in order to turn it into a WritableSeq. This struct is indeed a generalization ofSingularSeq(it is equivalent whencount = 1).
- SeparatedSeqAccept 
- 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.
- SeqArrViaConfig 
- A sequence implementation that takes elements in an array, and writes each element using the config. The config should implement WritableDatumConfig.
- SingularSeq 
- 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>
- StrArrSeq 
- Like ArrSeq, but specialized for string so that you don’t need to wrap each element in Str
Traits§
- WritableDatum Config 
- A helper object that writes other data, and not the object itself, on demand