mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-24 06:38:02 +00:00
Add 'Static' type and improve type substitution codegen to accept it (#886)
* Add Static type which defers to Encode/Decode and impls EncodeAsType/DecodeAsType * rename to static_type and impl Deref/Mut * Improve type substitution in codegen so that concrete types can be swapped in * A couple of comment tweaks and no need for a macro export * Extend type substitution logic to work recursively on destination type * cargo fmt * Fix a couple of comments * update ui test outpuot * Add docs and missing_docs lint * Add test for replacing multiple of Ident * Update codegen/src/error.rs Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com> * update copyright year and fix ui test * simplify another error --------- Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
This commit is contained in:
+5
-3
@@ -1,4 +1,4 @@
|
||||
// Copyright 2019-2022 Parity Technologies (UK) Ltd.
|
||||
// Copyright 2019-2023 Parity Technologies (UK) Ltd.
|
||||
// This file is dual-licensed as Apache-2.0 or GPL-3.0.
|
||||
// see LICENSE for license details.
|
||||
|
||||
@@ -43,9 +43,10 @@
|
||||
//! println!("{}", runtime_api);
|
||||
//! ```
|
||||
|
||||
#![deny(unused_crate_dependencies)]
|
||||
#![deny(unused_crate_dependencies, missing_docs)]
|
||||
|
||||
mod api;
|
||||
mod error;
|
||||
mod ir;
|
||||
mod types;
|
||||
|
||||
@@ -54,7 +55,8 @@ pub mod utils;
|
||||
pub use self::{
|
||||
api::{
|
||||
generate_runtime_api_from_bytes, generate_runtime_api_from_path,
|
||||
generate_runtime_api_from_url, CodegenError, RuntimeGenerator,
|
||||
generate_runtime_api_from_url, RuntimeGenerator,
|
||||
},
|
||||
error::{CodegenError, TypeSubstitutionError},
|
||||
types::{CratePath, Derives, DerivesRegistry, Module, TypeGenerator, TypeSubstitutes},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user