Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion codegen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,9 @@ pub use self::{
generate_runtime_api,
RuntimeGenerator,
},
types::GeneratedTypeDerives,
types::{
GeneratedTypeDerives,
Module,
TypeGenerator,
},
};
4 changes: 3 additions & 1 deletion codegen/src/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down