Skip to main content

Module prelude

Module prelude 

Source
Expand description

Convenience prelude for plugin authors.

use typewriter_plugin::prelude::*;

Re-exports§

pub use super::EmitterPlugin;
pub use super::PLUGIN_API_VERSION;
pub use super::PluginConfig;

Structs§

EnumDef
A complete enum definition in the IR.
FieldDef
A single field inside a struct.
StructDef
A complete struct definition in the IR.
VariantDef
A single enum variant.

Enums§

EnumRepr
How the enum is represented in JSON (mirrors serde’s options).
FileStyle
Supported file naming styles.
Language
The target languages that typewriter can generate code for.
PrimitiveType
Rust primitive types that map to language-specific equivalents.
TypeDef
Top-level item — either a struct or an enum.
TypeKind
Every Rust type is mapped to one of these variants.
VariantKind
The kind of data an enum variant carries.

Traits§

TypeMapper
The core trait that every language emitter must implement.

Functions§

to_file_style
Convert a PascalCase name to the specified file style.