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_with_force(
&mut self,
resolver: Arc<dyn Resolver>,
force: bool,
) -> Result<()>
pub fn register_with_force( &mut self, resolver: Arc<dyn Resolver>, force: bool, ) -> Result<()>
Register a resolver with optional force overwrite.
§Arguments
resolver- The resolver to registerforce- If true, overwrite any existing resolver with the same name. If false, return an error if the name is already registered.
§Returns
Ok(())on successErr(Error)if force=false and a resolver with the same name exists
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
This method implements framework-level handling of the sensitive kwarg per ADR-011.
The sensitive kwarg overrides the resolver’s sensitivity hint.
Note: default handling with lazy resolution is done at the Config level,
not here, to support nested interpolations in default values.
Trait Implementations§
Source§impl Clone for ResolverRegistry
impl Clone for ResolverRegistry
Source§fn clone(&self) -> ResolverRegistry
fn clone(&self) -> ResolverRegistry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto 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