Trait ActivationInterface

Source
pub trait ActivationInterface<'f, Fm: FnMarker = ()> {
    // Required methods
    fn variables(&self) -> &VariableBindings<'f>;
    fn functions(&self) -> &FunctionBindings<'f>;
}
Expand description

Interface for providing variable and function bindings during evaluation.

This trait defines the interface that activation types must implement to provide variable and function bindings to the CEL evaluator.

§Type Parameters

  • 'f - Lifetime of the functions in the bindings
  • Fm - Function marker type indicating sync/async function support

Required Methods§

Source

fn variables(&self) -> &VariableBindings<'f>

Returns a reference to the variable bindings.

Variable bindings map variable names to their values during evaluation.

Source

fn functions(&self) -> &FunctionBindings<'f>

Returns a reference to the function bindings.

Function bindings provide runtime function implementations that can override or supplement the functions registered in the environment.

Implementations on Foreign Types§

Source§

impl ActivationInterface<'static> for &()

Empty activation implementation for references to the unit type.

Source§

fn variables(&self) -> &VariableBindings<'static>

Source§

fn functions(&self) -> &FunctionBindings<'static>

Source§

impl ActivationInterface<'static> for ()

Empty activation implementation for the unit type.

This allows you to use () as an activation when no variable or function bindings are needed.

Source§

fn variables(&self) -> &VariableBindings<'static>

Source§

fn functions(&self) -> &FunctionBindings<'static>

Source§

impl<'f, Fm: FnMarker> ActivationInterface<'f, Fm> for Box<Activation<'f, Fm>>

Source§

impl<'f, Fm: FnMarker> ActivationInterface<'f, Fm> for Arc<Activation<'f, Fm>>

Implementors§

Source§

impl<'f, Fm: FnMarker> ActivationInterface<'f, Fm> for &Activation<'f, Fm>

Source§

impl<'f, Fm: FnMarker> ActivationInterface<'f, Fm> for Activation<'f, Fm>