pub struct RuleProgram { /* private fields */ }Expand description
A rule file, loaded under the rule frame, whose definitions can be called.
Implementations§
Source§impl RuleProgram
impl RuleProgram
Sourcepub fn load(
entry: Entry<'_>,
loader: &dyn Loader,
steps: usize,
) -> Result<Self, RuleFailure>
pub fn load( entry: Entry<'_>, loader: &dyn Loader, steps: usize, ) -> Result<Self, RuleFailure>
Parse, check, frame-check and load a rule file.
§Errors
RuleFailure::Escapes for a program reaching outside the frame,
RuleFailure::Load for every other refusal.
Sourcepub fn run(
&mut self,
def: &str,
form: &Spanned,
steps: usize,
) -> Result<Vec<RawFinding>, RuleFailure>
pub fn run( &mut self, def: &str, form: &Spanned, steps: usize, ) -> Result<Vec<RawFinding>, RuleFailure>
Call def on one form under a budget of steps.
§Errors
A RuleFailure naming why the rule produced nothing.
Auto Trait Implementations§
impl !Freeze for RuleProgram
impl !RefUnwindSafe for RuleProgram
impl !UnwindSafe for RuleProgram
impl Send for RuleProgram
impl Sync for RuleProgram
impl Unpin for RuleProgram
impl UnsafeUnpin for RuleProgram
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