1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Project: grippo
// File: src/expr/mod.rs
// Purpose: CEL predicates broken into grippo's primitives
// Language: Rust
//
// License: Apache-2.0
// Copyright: (c) 2026 HYPERI PTY LIMITED
//! CEL filter expressions lowered to prefix, suffix, substring, exact and
//! number checks over a [`crate::record::Record`], with no interpreter.
//!
//! The result is cel's, with each root field a variable holding that field's
//! value. Raw JSON bytes go straight to `eval`, and a raw line or a parser
//! chain's fields to `eval_record`. An expression outside the lowered subset is a [`Refusal`]
//! naming the first form that left it, so the caller runs its interpreter.
//!
//! ```
//! use grippo::expr::{Outcome, Program};
//!
//! let p = Program::compile(r#"event.dns.type == "query" || event.dns.type == "answer""#)?;
//! assert_eq!(p.eval(br#"{"event":{"dns":{"type":"answer"}}}"#), Outcome::True);
//! assert!(!p.matches(b"{}"));
//! # Ok::<(), grippo::expr::Refusal>(())
//! ```
pub use ;
pub use Refusal;
pub use ;
pub use ;
pub use ErrorKind;
pub use ;