#[non_exhaustive]pub struct PluginReport {
pub info: PluginInfo,
pub first_party: bool,
pub modules: Vec<PluginModuleReport>,
}Expand description
One plugin of a PluginsReport.
use navree_kernel::{Module, ModuleBuilder, Navree};
struct AnnouncementsModule;
impl Module for AnnouncementsModule {
fn register(&self, m: &mut ModuleBuilder) {
m.plugin(navree_kernel::plugin_info!(title = "Announcements"));
}
}
let report = Navree::app().module(AnnouncementsModule).plugin_report()?;
for plugin in &report.plugins {
println!("{} {} ({} modules)", plugin.info.name, plugin.info.version, plugin.modules.len());
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.info: PluginInfoWhat the plugin says about itself (its first module’s
PluginInfo, in dependency order).
first_party: boolWhether the kernel finds the plugin first-party: one of the
framework’s own packages, at the kernel’s version, every module a type
of that package. The JSON’s "first_party".
modules: Vec<PluginModuleReport>Its modules, in dependency order: every module that acts for the
plugin. That is a module that names it, a module of its crate, and a
generic module that no module of the app imports directly, such as the
module AccessModule::for_policy makes for a policy only the plugin
imports.
Trait Implementations§
Source§impl Clone for PluginReport
impl Clone for PluginReport
Auto Trait Implementations§
impl Forget for PluginReport
impl Freeze for PluginReport
impl Move for PluginReport
impl RefUnwindSafe for PluginReport
impl Send for PluginReport
impl Sync for PluginReport
impl Unpin for PluginReport
impl UnsafeUnpin for PluginReport
impl UnwindSafe for PluginReport
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