Struct liquid_core::parser::PluginRegistry
source · [−]pub struct PluginRegistry<P> { /* private fields */ }Expand description
Liquid language plugin registry.
Implementations
sourceimpl<P> PluginRegistry<P>
impl<P> PluginRegistry<P>
sourcepub fn register(&mut self, name: String, plugin: P) -> bool
pub fn register(&mut self, name: String, 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>ⓘNotable traits for PluginNames<'a, P>impl<'a, P> Iterator for PluginNames<'a, P> type Item = &'a str;
pub fn plugin_names(&self) -> PluginNames<'_, P>ⓘNotable traits for PluginNames<'a, P>impl<'a, P> Iterator for PluginNames<'a, P> type Item = &'a str;
All available plugins
Trait Implementations
sourceimpl<P> Clone for PluginRegistry<P> where
P: Clone,
impl<P> Clone for PluginRegistry<P> where
P: Clone,
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more