pub struct Limit { /* private fields */ }Expand description
Limits the number of steps a reduction or evaluation function performs until processing is stopped.
This inspection counts each call to the Inspect::inspect function. If the
number of calls counted so far is less than the limit for which the Limit
has been constructed it returns Stop::No to continue processing. If the
limit has been reached it returns Stop::Yes to instruct the evaluation
or reduction function to stop processing.
A limit of 0 means that not reduction will be performed at all.
§Examples
let mut term = app(
lam("a", app(var("a"), var("a"))),
lam("a", app(var("a"), var("a"))),
);
term.reduce_inspected::<NormalOrder<Enumerate>, _>(&mut Limit::new(5));Implementations§
Trait Implementations§
impl StructuralPartialEq for Limit
Auto Trait Implementations§
impl Freeze for Limit
impl RefUnwindSafe for Limit
impl Send for Limit
impl Sync for Limit
impl Unpin for Limit
impl UnsafeUnpin for Limit
impl UnwindSafe for Limit
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