mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-24 15:57:58 +00:00
Export codegen::TypeGenerator (#444)
* Export codegen::TypeGenerator * Export Module and add comments to public methods * Fmt
This commit is contained in:
+5
-1
@@ -25,5 +25,9 @@ pub use self::{
|
||||
generate_runtime_api,
|
||||
RuntimeGenerator,
|
||||
},
|
||||
types::GeneratedTypeDerives,
|
||||
types::{
|
||||
GeneratedTypeDerives,
|
||||
Module,
|
||||
TypeGenerator,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -221,6 +221,7 @@ impl<'a> TypeGenerator<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Represents a Rust `mod`, containing generated types and child `mod`s.
|
||||
#[derive(Debug)]
|
||||
pub struct Module<'a> {
|
||||
name: Ident,
|
||||
@@ -248,7 +249,8 @@ impl<'a> ToTokens for Module<'a> {
|
||||
}
|
||||
|
||||
impl<'a> Module<'a> {
|
||||
pub fn new(name: Ident, root_mod: Ident) -> Self {
|
||||
/// Create a new [`Module`], with a reference to the root `mod` for resolving type paths.
|
||||
pub(crate) fn new(name: Ident, root_mod: Ident) -> Self {
|
||||
Self {
|
||||
name,
|
||||
root_mod,
|
||||
|
||||
Reference in New Issue
Block a user