pub struct ContextResolver<F> { /* private fields */ }Expand description
Resolves context inheritance chains.
The resolver takes contexts with inherits_from references and produces
fully resolved contexts with all inherited values merged.
Implementations§
Source§impl<F> ContextResolver<F>
impl<F> ContextResolver<F>
Sourcepub fn resolve(
&mut self,
context: &ExecutionContext,
) -> Result<ExecutionContext, ContextError>
pub fn resolve( &mut self, context: &ExecutionContext, ) -> Result<ExecutionContext, ContextError>
Resolve a context, applying all inherited values from parent contexts.
§Errors
Returns an error if:
- A parent context cannot be loaded
- Circular inheritance is detected
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clear the resolution cache.
Sourcepub fn invalidate(&mut self, context_id: &str)
pub fn invalidate(&mut self, context_id: &str)
Invalidate a specific context from the cache.
Auto Trait Implementations§
impl<F> Freeze for ContextResolver<F>where
F: Freeze,
impl<F> RefUnwindSafe for ContextResolver<F>where
F: RefUnwindSafe,
impl<F> Send for ContextResolver<F>where
F: Send,
impl<F> Sync for ContextResolver<F>where
F: Sync,
impl<F> Unpin for ContextResolver<F>where
F: Unpin,
impl<F> UnwindSafe for ContextResolver<F>where
F: 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