pub struct Budget {
pub steps: u64,
pub lines: usize,
}Expand description
Caller-supplied cap on a Speculation’s VM stepping, in place of the
runtime’s hardcoded STEP_LIMIT/LINE_LIMIT ceilings.
stepsbounds a singleSpeculation::advancecall’s inner VM step loop (mirrorsFlowInstance’s privateSTEP_LIMIT, 1,000,000 in production).linesbounds the total number of visible lines aSpeculationmay produce over its lifetime, across however manyadvancecalls the caller makes (mirrorsFlowInstance::LINE_LIMIT, 10,000 in production).
The Default is well under both production ceilings — a speculative
probe is expected to be short-lived, so a runaway one should fail fast
rather than approach the live budgets.
Fields§
§steps: u64Max VM steps for a single advance call.
lines: usizeMax visible lines this Speculation may ever produce.
Trait Implementations§
impl Copy for Budget
impl Eq for Budget
impl StructuralPartialEq for Budget
Auto Trait Implementations§
impl Freeze for Budget
impl RefUnwindSafe for Budget
impl Send for Budget
impl Sync for Budget
impl Unpin for Budget
impl UnsafeUnpin for Budget
impl UnwindSafe for Budget
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