pub struct PluginSet { /* private fields */ }Expand description
The compile-time plugin set assembled by crate::kian_plugins!.
Activation order is derived from declared dependencies, not listing
order.
Implementations§
Source§impl PluginSet
impl PluginSet
pub const fn new() -> Self
Sourcepub fn register<P: Plugin>(&mut self, plugin: P)
pub fn register<P: Plugin>(&mut self, plugin: P)
Registers a plugin (name and dependencies are read immediately).
Sourcepub fn activate(self, ctx: &mut Ctx) -> Result<Disposer, PluginError>
pub fn activate(self, ctx: &mut Ctx) -> Result<Disposer, PluginError>
Activates every plugin in deterministic topological order. On the
first failure, already-activated plugins are unwound in reverse
activation order exactly once and the error is returned. On success,
the returned Disposer unwinds the whole set in reverse activation
order.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for PluginSet
impl !Sync for PluginSet
impl !UnwindSafe for PluginSet
impl Forget for PluginSet
impl Freeze for PluginSet
impl Move for PluginSet
impl Send for PluginSet
impl Unpin for PluginSet
impl UnsafeUnpin for PluginSet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more