Skip to main content

Crate cel

Crate cel 

Source
Expand description

§CEL-Rust

A parser and interpreter for the Common Expression Language (CEL) in Rust.

§Optional Features

  • structs: Enables support for custom struct types. This allows you to define struct definitions using [StructDef] and add them to your Env. Custom structs can then be instantiated and accessed within CEL expressions.
  • chrono: Enables support for duration and timestamp types using the chrono crate.
  • regex: Enables support for regular expressions.
  • json: Enables conversion between CEL values and JSON.

Re-exports§

pub use common::ast::IdedExpr;
pub use context::Context;
pub use functions::FunctionContext;
pub use objects::ResolveResult;
pub use objects::Value;
pub use parser::ParseError;
pub use parser::ParseErrors;

Modules§

common
context
extractors
functions
objects
parser

Macros§

impl_conversions
impl_handler

Structs§

Duration
A wrapper Duration type which allows conversion to Value::Duration for types using automatic conversion with serde::Serialize.
Env
An environment for the CEL execution.
Program
Timestamp
A wrapper Timestamp type which allows conversion to Value::Timestamp for types using automatic conversion with serde::Serialize.

Enums§

ExecutionError
SerializationError

Functions§

to_value