#[non_exhaustive]pub struct PluginsReport {
pub plugins: Vec<PluginReport>,
}Expand description
Every plugin of an app and what each of its modules adds: what the
plugins command prints (its Display text, or
to_json with --json). Read from the module
graph; nothing is built to make it.
use navree_kernel::Navree;
let report = Navree::app().plugin_report()?;
assert!(report.plugins.is_empty());
assert_eq!(report.to_string(), "No plugins: no module of this app calls m.plugin(..).");Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.plugins: Vec<PluginReport>Every plugin, by name.
Implementations§
Source§impl PluginsReport
impl PluginsReport
Sourcepub fn to_json(&self) -> String
pub fn to_json(&self) -> String
The report as one JSON object, what plugins --json prints:
{
"navree": "1.3.0",
"plugins": [
{"name": "navree-plugin-announcements", "namespace": "announcements",
"version": "1.0.0", "title": "Announcements", "description": null,
"homepage": null, "repository": null, "license": "MIT OR Apache-2.0",
"first_party": false,
"modules": [
{"name": "AnnouncementsModule",
"type": "navree_plugin_announcements::AnnouncementsModule",
"commands": ["announcements:prune"],
"contributions": {"navree_kernel::plugin::Publishable": 2},
"publishable": {"views": 3, "locales": 2}}
]}
]
}Plugins come by name, their modules in dependency order. Keys may be
added in later releases, never removed. type and the keys of
contributions are std::any::type_name output: for reading, not for
matching; they may change in any release.
Trait Implementations§
Source§impl Clone for PluginsReport
impl Clone for PluginsReport
Source§impl Debug for PluginsReport
impl Debug for PluginsReport
Source§impl Default for PluginsReport
impl Default for PluginsReport
Source§impl Display for PluginsReport
What plugins prints: one block per plugin, blocks parted by an empty
line. A block’s first line is the namespace, the name and version, and the
title when there is one; then, per module, its name and type, the commands
it registers, what it adds (counts by short type name) and the files it
publishes, each line left out when empty:
impl Display for PluginsReport
What plugins prints: one block per plugin, blocks parted by an empty
line. A block’s first line is the namespace, the name and version, and the
title when there is one; then, per module, its name and type, the commands
it registers, what it adds (counts by short type name) and the files it
publishes, each line left out when empty:
announcements navree-plugin-announcements 1.0.0 Announcements
AnnouncementsModule navree_plugin_announcements::AnnouncementsModule
commands announcements:prune
adds 1 ControllerRegistration, 1 MigrationSet, 2 Publishable
publishes 3 views, 2 locales