Expand description
Helpers used by compile-time-expanded CEL rules emitted by the plugin.
CEL rules are transpiled to native Rust at codegen time, so this module
is a narrow support layer rather than an interpreter: scalar widening
(CelScalar), Duration/Timestamp conversion
(duration_from_secs_nanos, timestamp_from_secs_nanos), and the
per-evaluation now binding (now_local).
Traits§
- CelScalar
- Width-converts a proto scalar (or enum wrapper) into CEL’s wide types
(
i64/u64/f64).
Functions§
- duration_
from_ secs_ nanos - Construct a
chrono::Durationfrom a protobuf-shaped(seconds, nanos)pair (the wire format ofgoogle.protobuf.Duration). - now_
local - Current wall-clock time as a
chrono::DateTime<chrono::FixedOffset>. - parse_
duration - Parse a CEL
duration("…")string into achrono::Duration. - parse_
timestamp - Parse a CEL
timestamp("…")string (RFC3339). - timestamp_
from_ secs_ nanos - Construct a
chrono::DateTime<chrono::FixedOffset>from a protobuf-shaped(seconds, nanos)pair (the wire format ofgoogle.protobuf.Timestamp).