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§
- Errors that can be emitted from codegen.
- fetch_metadata
fetch-metadata
Helper methods for fetching metadata from a file or URL.
Structs§
- Generate a type safe interface to use with
subxt
. The options exposed here are similar to those exposed via the#[subxt]
macro or via thesubxt codegen
CLI command. Both use this under the hood. - 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§
- The default
scale_typegen::TypeGeneratorSettings
, subxt is using for generating code. Useful for emulating subxt’s code generation settings from e.g. subxt-explorer.