pub struct PluginRegistry<P> { /* private fields */ }
Expand description
Liquid language plugin registry.
Implementations§
Source§impl<P> PluginRegistry<P>
impl<P> PluginRegistry<P>
Sourcepub fn register(&mut self, name: &'static str, plugin: P) -> bool
pub fn register(&mut self, name: &'static str, plugin: P) -> bool
Register a plugin
Generally this is used when setting up the program.
Returns whether this overrode an existing plugin.
Sourcepub fn get(&self, name: &str) -> Option<&P>
pub fn get(&self, name: &str) -> Option<&P>
Look up an existing plugin.
Generally this is used for running plugins.
Sourcepub fn plugin_names(&self) -> PluginNames<'_, P> ⓘ
pub fn plugin_names(&self) -> PluginNames<'_, P> ⓘ
All available plugins
Trait Implementations§
Source§impl<P> Clone for PluginRegistry<P>where
P: Clone,
impl<P> Clone for PluginRegistry<P>where
P: Clone,
Auto Trait Implementations§
impl<P> Freeze for PluginRegistry<P>
impl<P> RefUnwindSafe for PluginRegistry<P>where
P: RefUnwindSafe,
impl<P> Send for PluginRegistry<P>where
P: Send,
impl<P> Sync for PluginRegistry<P>where
P: Sync,
impl<P> Unpin for PluginRegistry<P>where
P: Unpin,
impl<P> UnwindSafe for PluginRegistry<P>where
P: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more