pub struct EpochBumper { /* private fields */ }Expand description
Cooperative cancel handle for an in-flight eval. Wraps a clone of
the Session’s [wasmtime::Engine]; the engine’s epoch counter is
shared internally so a .bump() from any task takes effect on the
concurrent func.call_async running against the same engine.
Each Session sets store.set_epoch_deadline(1) before invoking
nomi-eval, so one bump trips the deadline and the eval traps
with wasmtime::Trap::Interrupt — surfaced upstream as
EngineError::EpochInterrupt and on the wire as
(:error (:code interrupted ...)).
Implementations§
Source§impl EpochBumper
impl EpochBumper
Trait Implementations§
Source§impl Clone for EpochBumper
impl Clone for EpochBumper
Auto Trait Implementations§
impl !RefUnwindSafe for EpochBumper
impl !UnwindSafe for EpochBumper
impl Freeze for EpochBumper
impl Send for EpochBumper
impl Sync for EpochBumper
impl Unpin for EpochBumper
impl UnsafeUnpin for EpochBumper
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more