pub struct ResolverRegistry { /* private fields */ }Expand description
Registry of available resolvers
Implementations§
Source§impl ResolverRegistry
impl ResolverRegistry
Sourcepub fn with_builtins() -> Self
pub fn with_builtins() -> Self
Create a registry with the standard built-in resolvers
Sourcepub fn register_fn<F>(&mut self, name: impl Into<String>, func: F)where
F: Fn(&[String], &HashMap<String, String>, &ResolverContext) -> Result<ResolvedValue> + Send + Sync + 'static,
pub fn register_fn<F>(&mut self, name: impl Into<String>, func: F)where
F: Fn(&[String], &HashMap<String, String>, &ResolverContext) -> Result<ResolvedValue> + Send + Sync + 'static,
Register a function as a resolver
Sourcepub fn resolve(
&self,
resolver_name: &str,
args: &[String],
kwargs: &HashMap<String, String>,
ctx: &ResolverContext,
) -> Result<ResolvedValue>
pub fn resolve( &self, resolver_name: &str, args: &[String], kwargs: &HashMap<String, String>, ctx: &ResolverContext, ) -> Result<ResolvedValue>
Resolve an interpolation using the appropriate resolver
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ResolverRegistry
impl !RefUnwindSafe for ResolverRegistry
impl Send for ResolverRegistry
impl Sync for ResolverRegistry
impl Unpin for ResolverRegistry
impl !UnwindSafe for ResolverRegistry
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