Skip to main content

Crate wiretypes_macro

Crate wiretypes_macro 

Source

Attribute Macrosยง

wire
Derives JsonSchema for a struct or enum crossing a language boundary and registers it with wiretypes. On a type alias it registers the aliased type under the alias name; an alias over a non-std map also gets an {Alias}Wire twin over the std one, which a field of the alias type names in #[schemars(with = "..Wire")]. On a const or an immutable static whose type is Serialize and JsonSchema, it registers the value, which the targets spell as a literal; a LazyLock static is spelled as the value it builds.