pub trait Handler {
// Required methods
fn metadata(&self) -> PluginInfo;
fn on_event(&self, event: Event);
}Expand description
The core trait for implementing a Hydrust plugin.
Users must implement this trait to define how the plugin identifies itself and how it responds to events.
Note: Your implementation struct must also implement Default, as
the plugin instance is instantiated ephemerally for each call.
Required Methods§
Sourcefn metadata(&self) -> PluginInfo
fn metadata(&self) -> PluginInfo
Returns metadata about the plugin.
This is called by the host to register the plugin’s name, version, and capabilities.