MCPcopy Create free account
hub / github.com/cel-rust/cel-rust / VariableResolver

Interface VariableResolver

cel/src/context.rs:285–287  ·  view source on GitHub ↗

VariableResolver implements a custom resolver for variables that is consulted before looking at variables added to the context. This allows dynamic variables, or avoiding HashMap lookup/creation. # Example ``` struct ValueContext { request: cel::Value, response: cel::Value, } impl cel::context::VariableResolver for ValueContext { fn resolve(&self, variable: &str) -> Option { match v

Source from the content-addressed store, hash-verified

283/// }
284/// ```
285pub trait VariableResolver: Send + Sync {
286 fn resolve(&self, variable: &str) -> Option<Value>;
287}
288
289impl<T: VariableResolver> VariableResolver for Box<T> {
290 fn resolve(&self, variable: &str) -> Option<Value> {

Callers

nothing calls this directly

Implementers 2

runtime.rscel/benches/runtime.rs
context.rscel/src/context.rs

Calls

no outgoing calls

Tested by

no test coverage detected