struct WorkBudget {
loop_limit: usize,
backward_jumps: usize,
loop_calls: usize,
skipped: usize,
}Expand description
Tracks budgets for control flow to limit execution time.
Fields§
§loop_limit: usizeMaximum number of times we can do backward jumps or loop calls.
backward_jumps: usizeCurrent number of backward jumps executed.
loop_calls: usizeCurrent number of loop call iterations executed.
skipped: usizeCounts number of instructions skipped when handling if/else conditions.
Implementations§
Source§impl WorkBudget
impl WorkBudget
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>
fn skipping_instruction(&mut self) -> Result<(), HintErrorKind>
Auto Trait Implementations§
impl Freeze for WorkBudget
impl RefUnwindSafe for WorkBudget
impl Send for WorkBudget
impl Sync for WorkBudget
impl Unpin for WorkBudget
impl UnsafeUnpin for WorkBudget
impl UnwindSafe for WorkBudget
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