Export codegen::TypeGenerator (#444)

* Export codegen::TypeGenerator

* Export Module and add comments to public methods

* Fmt
This commit is contained in:
Andrew Jones
2022-02-12 19:02:34 +00:00
committed by GitHub
parent 4bed7eb716
commit 7615b2586d
2 changed files with 8 additions and 2 deletions
+3 -1
View File
@@ -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,