pub trait Plugin: Sized {
type Error: Error;
// Required methods
fn start() -> Result<Self, Self::Error>;
fn info(&self) -> PluginInfo;
// Provided methods
fn enable(&mut self) -> Result<(), Self::Error> { ... }
fn disable(&mut self) { ... }
}
Expand description
The trait that all plugins should implement
Required Associated Types§
Required Methods§
sourcefn start() -> Result<Self, Self::Error>
fn start() -> Result<Self, Self::Error>
Called when X-Plane loads this plugin
On success, returns a plugin object
sourcefn info(&self) -> PluginInfo
fn info(&self) -> PluginInfo
Returns information on this plugin
Provided Methods§
Object Safety§
This trait is not object safe.