#[non_exhaustive]pub struct PluginModuleReport {
pub id: ModuleId,
pub commands: Vec<&'static str>,
pub contributions: Vec<(&'static str, usize)>,
pub publishable: Vec<(PublishTag, usize)>,
}Expand description
One module of a PluginReport.
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()?;
let module = &report.plugins[0].modules[0];
assert_eq!(module.id.name(), "AnnouncementsModule");
assert!(module.commands.is_empty() && module.publishable.is_empty());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.id: ModuleIdThe module’s id: ModuleId::name and ModuleId::type_name name it.
commands: Vec<&'static str>The commands it registers, in registration order.
contributions: Vec<(&'static str, usize)>How many values of each type it contributes, by full type name, in
name order. type and the keys of contributions are
std::any::type_name output: for reading, not for matching; they may
change in any release.
publishable: Vec<(PublishTag, usize)>How many files it can publish, per tag, in PublishTag::ALL order
(a tag without files is left out).
Trait Implementations§
Source§impl Clone for PluginModuleReport
impl Clone for PluginModuleReport
Auto Trait Implementations§
impl Forget for PluginModuleReport
impl Freeze for PluginModuleReport
impl Move for PluginModuleReport
impl RefUnwindSafe for PluginModuleReport
impl Send for PluginModuleReport
impl Sync for PluginModuleReport
impl Unpin for PluginModuleReport
impl UnsafeUnpin for PluginModuleReport
impl UnwindSafe for PluginModuleReport
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