pub trait CommandModule:
Send
+ Sync
+ Debug
+ 'static {
// Required methods
fn category(&self) -> String;
fn register(&self, context: &mut ModuleContext<'_>) -> RuntimeGroupSpec;
// Provided methods
fn guides(&self) -> Vec<GuideEntry> { ... }
fn views(&self) -> Vec<HumanViewDef> { ... }
}Expand description
Trait-based module API for larger command domains.
Implement this when a module has dependencies or enough setup logic that a named type is clearer than a closure.
Required Methods§
Sourcefn register(&self, context: &mut ModuleContext<'_>) -> RuntimeGroupSpec
fn register(&self, context: &mut ModuleContext<'_>) -> RuntimeGroupSpec
Registers the module’s top-level runtime group.
Provided Methods§
Sourcefn guides(&self) -> Vec<GuideEntry>
fn guides(&self) -> Vec<GuideEntry>
Guide entries contributed by this module.
Sourcefn views(&self) -> Vec<HumanViewDef>
fn views(&self) -> Vec<HumanViewDef>
Human views contributed by this module.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".