pub struct ExprContext {
pub input: Value,
pub steps: HashMap<String, StepResult>,
}Expand description
Evaluation context holding pipeline state.
Fields§
§input: Value§steps: HashMap<String, StepResult>Implementations§
Source§impl ExprContext
impl ExprContext
pub fn new(input: Value) -> Self
Sourcepub fn eval(&self, expr: &str) -> Result<Value, ExprError>
pub fn eval(&self, expr: &str) -> Result<Value, ExprError>
Resolve an expression string to a JSON value.
{{ path }}(entire string) — resolves to the typed JSON value at path.- Strings containing one or more
{{ path }}snippets — interpolated: each snippet is replaced with its string representation; result is a JSON string. - Plain strings with no
{{ }}— returned unchanged as a JSON string.
Auto Trait Implementations§
impl Freeze for ExprContext
impl RefUnwindSafe for ExprContext
impl Send for ExprContext
impl Sync for ExprContext
impl Unpin for ExprContext
impl UnsafeUnpin for ExprContext
impl UnwindSafe for ExprContext
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