Skip to main content

Module prepared_segment

Module prepared_segment 

Source
Expand description

Prepared typed execution over the existing raw interpreter. Executes one construction-validated canonical borrowed frame.

use cel_runtime::{DynSegment, Nil, Leaf, IntoCStackList};
let mut body = DynSegment::new::<()>();
body.just(7i32);
let mut prepared = body.prepare::<Nil, Leaf<i32>>().unwrap();
assert_eq!(prepared.call(&().into_c_stack_list()).unwrap(), 7);

Structsยง

PreparedRawSegment
Owns the same frozen raw engine as PreparedSegment with runtime-bound witnesses.
PreparedSegment
Owns a frozen raw body with exact canonical argument/result witnesses.