pub trait PluginAware: Sized {
// Required methods
fn plugin_manager(&self) -> &PluginManager<Self>;
fn plugin_manager_mut(&mut self) -> &mut PluginManager<Self>;
// Provided method
fn apply_plugin<P>(&mut self) -> Result<(), PayloadError<ProjectError>>
where P: Plugin<Self> { ... }
}
Expand description
Some value that can have plugins applied to it.
Required Methods§
Sourcefn plugin_manager(&self) -> &PluginManager<Self>
fn plugin_manager(&self) -> &PluginManager<Self>
Gets a reference to the plugin manager for this value.
Sourcefn plugin_manager_mut(&mut self) -> &mut PluginManager<Self>
fn plugin_manager_mut(&mut self) -> &mut PluginManager<Self>
Gets a mutable reference to the plugin manager for this value.
Provided Methods§
Sourcefn apply_plugin<P>(&mut self) -> Result<(), PayloadError<ProjectError>>where
P: Plugin<Self>,
fn apply_plugin<P>(&mut self) -> Result<(), PayloadError<ProjectError>>where
P: Plugin<Self>,
Apply a plugin to this.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.