pub struct ModuleTree {
pub name: String,
pub items: Vec<String>,
pub children: Vec<ModuleTree>,
}Expand description
Structured representation of generated Rust code grouped into a module hierarchy.
Each node corresponds to one package segment. The root node represents
the top-level scope (empty name). items holds rendered Rust code
(struct definitions, impls, etc.) belonging to this module. children
hold sub-packages.
Fields§
§name: StringModule name (one package segment, e.g. "foo" for package foo.bar).
Empty string for the root node.
items: Vec<String>Rendered Rust items (one string per file’s content at this package level).
children: Vec<ModuleTree>Sub-package modules (one per unique next segment).
Implementations§
Trait Implementations§
Source§impl Clone for ModuleTree
impl Clone for ModuleTree
Source§fn clone(&self) -> ModuleTree
fn clone(&self) -> ModuleTree
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModuleTree
impl Debug for ModuleTree
Source§impl Default for ModuleTree
impl Default for ModuleTree
Source§fn default() -> ModuleTree
fn default() -> ModuleTree
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ModuleTree
impl RefUnwindSafe for ModuleTree
impl Send for ModuleTree
impl Sync for ModuleTree
impl Unpin for ModuleTree
impl UnsafeUnpin for ModuleTree
impl UnwindSafe for ModuleTree
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more