pub struct EvalCtx {
pub fuel: usize,
pub ops: HashMap<String, Arc<CustomOp>>,
}Expand description
Per-evaluation context: fuel budget + custom operator map.
EvalCtx is Send + Sync. Build once, share via Arc<EvalCtx> across
threads. Each evaluate() call receives &EvalCtx and maintains its own
stack-local fuel counter — no shared mutable state.
Fields§
§fuel: usizeMaximum AST nodes the evaluator may visit. Default: 200.
ops: HashMap<String, Arc<CustomOp>>Custom operator map: operator name → handler.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for EvalCtx
impl !UnwindSafe for EvalCtx
impl Freeze for EvalCtx
impl Send for EvalCtx
impl Sync for EvalCtx
impl Unpin for EvalCtx
impl UnsafeUnpin for EvalCtx
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