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", "type": "crm::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. A module’s type is its full type path
(ModuleId::type_name): for reading, not
for matching. commands lists the built-ins (module: null), then
every module’s commands; a built-in that yields to a module command of
its name (plugins, plugin:publish) is left out. Nothing is
constructed to produce it.
The introspect command adds a "plugins" array, as
PluginsReport::to_json writes it.