Skip to main content

Plugin

Trait Plugin 

Source
pub trait Plugin: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn register(&self, ctx: &mut dyn PluginContext);

    // Provided method
    fn shutdown(&self) { ... }
}
Expand description

Plugin trait for extending the CVKG CLI.

Implement this trait to add custom commands, build steps, or asset processors.

Required Methods§

Source

fn name(&self) -> &str

Unique name for this plugin.

Source

fn register(&self, ctx: &mut dyn PluginContext)

Called during CLI initialization to register commands and hooks.

Provided Methods§

Source

fn shutdown(&self)

Called before the CLI shuts down.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§