struct LoopBudget {
limit: usize,
backward_jumps: usize,
loop_calls: usize,
}
Expand description
Tracks budgets for loops to limit execution time.
Fields§
§limit: usize
Maximum number of times we can do backward jumps or loop calls.
backward_jumps: usize
Current number of backward jumps executed.
loop_calls: usize
Current number of loop call iterations executed.
Implementations§
Source§impl LoopBudget
impl LoopBudget
fn new(outlines: &Outlines<'_>, point_count: Option<usize>) -> Self
fn reset(&mut self)
fn doing_backward_jump(&mut self) -> Result<(), HintErrorKind>
fn doing_loop_call(&mut self, count: usize) -> Result<(), HintErrorKind>
Auto Trait Implementations§
impl Freeze for LoopBudget
impl RefUnwindSafe for LoopBudget
impl Send for LoopBudget
impl Sync for LoopBudget
impl Unpin for LoopBudget
impl UnwindSafe for LoopBudget
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