Skip to main content

Module eval

Module eval 

Source
Expand description

Evaluation carriers: bind language expressions/predicates to trusted route-level metadata and transport evaluation failures as typed camel_api::CamelError::ExpressionFailed errors.

Language crates produce Expression/Predicate implementations whose failures are LanguageErrors. Route execution needs the opposite: a fallible closure returning Result<_, CamelError> enriched with route metadata (route id, step id, verb) and the trusted compile-time destination. to_expression_failed performs that mapping; the carrier structs package it behind the closure shapes camel_api::ValueSource/PredicateSource consume.

Structs§

EvalMeta
Trusted route-level metadata describing WHERE and HOW an expression is evaluated.
LanguageExpressionEval
An Expression bound to trusted route metadata, evaluating to Result<Value, CamelError>.
LanguagePredicateEval
A Predicate bound to trusted route metadata, evaluating to Result<bool, CamelError>.

Functions§

to_expression_failed
Map a LanguageError onto CamelError::ExpressionFailed using the trusted route metadata.