Crate json_typegen_shared

Source
Expand description

json_typegen as just a library, for use in build scripts and other crates. If you want an actual interface, like a website, CLI or procedural macro, check the repo: github.com/evestera/json_typegen

Note: This crate is to a certain extent considered internal API of the json_typegen tools. If you want to use this crate directly, be prepared for breaking changes to happen, and consider opening an issue to let me know what you are using. (Breaking changes may still happen, but then I’ll at least try to keep your use-case in mind if possible. This has happened enough by now that there are parts I already consider public API.)

Modules§

parse
Functions for parsing json_typegen macro invocations and their arguments

Structs§

JTError
The Error type.
Options
Options for the code generation

Enums§

ErrorKind
The kind of an error.
ImportStyle
How imports/external types should be handled by code generation
OutputMode
Shape
The type representing the inferred structure

Traits§

ResultExt
Additional methods for Result, for easy interaction with this crate.

Functions§

codegen
The main code generation function for json_typegen
codegen_from_macro
Generate code from a json_typegen macro invocation
codegen_from_macro_input
Generate code from the arguments to a json_typegen macro invocation
codegen_from_shape
Just code generation, no inference