Crate subxt_codegen

Source
Expand description

Generate a type safe Subxt interface for a Substrate runtime from its metadata. This is used by the #[subxt] macro and subxt codegen CLI command, but can also be used directly if preferable.

Re-exports§

pub use error::CodegenError;
pub use syn;

Modules§

error
Errors that can be emitted from codegen.

Structs§

CodegenBuilder
Generate a type safe interface to use with subxt. The options exposed here are similar to those exposed via the #[subxt] macro or via the subxt codegen CLI command. Both use this under the hood.
Metadata
Node metadata. This can be constructed by providing some compatible frame_metadata which is then decoded into this. We aim to preserve all of the existing information in the incoming metadata while optimizing the format a little for Subxt’s use cases.

Functions§

default_subxt_type_gen_settings
The default scale_typegen::TypeGeneratorSettings, subxt is using for generating code. Useful for emulating subxt’s code generation settings from e.g. subxt-explorer.