pub struct Program { /* private fields */ }
Implementations§
Source§impl Program
impl Program
pub fn compile(source: &str) -> Result<Program, ParseError>
pub fn execute(&self, context: &Context<'_>) -> ResolveResult
Sourcepub fn references(&self) -> ExpressionReferences<'_>
pub fn references(&self) -> ExpressionReferences<'_>
Returns the variables and functions referenced by the CEL program
§Example
let program = Program::compile("size(foo) > 0").unwrap();
let references = program.references();
assert!(references.has_function("size"));
assert!(references.has_variable("foo"));
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Program
impl RefUnwindSafe for Program
impl Send for Program
impl Sync for Program
impl Unpin for Program
impl UnwindSafe for Program
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more