pub struct DenyAllEffects;Expand description
A handler that fails any effect call. Useful as a default for pure-only runs.
Trait Implementations§
Source§impl EffectHandler for DenyAllEffects
impl EffectHandler for DenyAllEffects
fn dispatch( &mut self, kind: &str, op: &str, _args: Vec<Value>, ) -> Result<Value, String>
Source§fn note_call_budget(&mut self, _budget_cost: u64) -> Result<(), String>
fn note_call_budget(&mut self, _budget_cost: u64) -> Result<(), String>
Hook called by the VM at every function call so handlers can
enforce per-call budget consumption (#225). The argument is
the sum of
[budget(N)] declared on the callee’s signature;
the handler returns Err to refuse the call (the VM converts
to VmError::Effect). Default impl is a no-op so legacy
handlers and pure-only runs are unaffected.Source§fn spawn_for_worker(&self) -> Option<Box<dyn EffectHandler + Send>>
fn spawn_for_worker(&self) -> Option<Box<dyn EffectHandler + Send>>
list.par_map worker-handler factory (#305 slice 2). Read moreAuto Trait Implementations§
impl Freeze for DenyAllEffects
impl RefUnwindSafe for DenyAllEffects
impl Send for DenyAllEffects
impl Sync for DenyAllEffects
impl Unpin for DenyAllEffects
impl UnsafeUnpin for DenyAllEffects
impl UnwindSafe for DenyAllEffects
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