Skip to main content

Module callable

Module callable 

Source
Expand description

Signature-typed callable facade over the canonical shared carrier. Calls native and prepared bodies through one statically fixed signature.

use cel_runtime::{Callable, CNil, EmptyList};
let f = Callable::from_fn(|_: &CNil<()>| Ok(7i32));
assert_eq!(f.call(&CNil::<()>::root_empty()).unwrap(), 7);

Structsยง

Callable
Shares a callable whose borrowed arguments and owned result have fixed Rust types.