pub struct GraphReport {
pub modules: Vec<ModuleReport>,
}Expand description
The validated module graph, as printed by check --graph.
Fields§
§modules: Vec<ModuleReport>Every module in dependency order (imports first); the implicit app root App is last.
Implementations§
Source§impl GraphReport
impl GraphReport
Sourcepub fn has_command(&self, name: &str) -> bool
pub fn has_command(&self, name: &str) -> bool
Whether any module registers the command name.
Source§impl GraphReport
impl GraphReport
Sourcepub fn to_json(&self) -> String
pub fn to_json(&self) -> String
The report as one JSON object, what introspect --json prints:
{
"navree": "1.0.0",
"modules": [
{"name": "DealsModule", "global": false, "root": false,
"imports": ["DatabaseModule"], "exports": ["crm::DealService"],
"providers": [{"type": "crm::DealService", "scope": "singleton",
"exported": true, "multi": false, "dependencies": ["navree_db::Db"]}],
"commands": [{"name": "crm:close", "about": "Close stale deals"}]}
],
"commands": [{"name": "check", "about": "...", "module": null}, ...]
}Modules come in dependency order (imports first); the implicit app
root, which imports the app’s root modules, is last with "root": true. commands lists the built-ins (module: null), then every
module’s commands. Nothing is constructed to produce it.
Trait Implementations§
Source§impl Clone for GraphReport
impl Clone for GraphReport
Source§impl Debug for GraphReport
impl Debug for GraphReport
Auto Trait Implementations§
impl Forget for GraphReport
impl Freeze for GraphReport
impl Move for GraphReport
impl RefUnwindSafe for GraphReport
impl Send for GraphReport
impl Sync for GraphReport
impl Unpin for GraphReport
impl UnsafeUnpin for GraphReport
impl UnwindSafe for GraphReport
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