pub struct InterpreterTarget { /* private fields */ }Expand description
One instrumentation target around the actual retained CPS continuation. It neither replays source nor owns a second evaluator.
Implementations§
Source§impl InterpreterTarget
impl InterpreterTarget
pub fn start( hub: &InstrumentationHub, target: TargetHandle, source_id: impl Into<String>, source: &str, environment: HashMap<String, Value>, ) -> Result<Self, InstrumentationError>
pub fn target(&self) -> &TargetHandle
pub fn state(&self) -> EvalFiberState
pub fn pending(&self) -> Option<Promise>
pub fn environment(&self) -> HashMap<String, Value>
pub fn environment_clone_count(&self) -> u64
pub fn paused(&self) -> bool
Sourcepub fn step(
&mut self,
hub: &mut InstrumentationHub,
) -> Result<InterpreterBoundary, InstrumentationError>
pub fn step( &mut self, hub: &mut InstrumentationHub, ) -> Result<InterpreterBoundary, InstrumentationError>
Executes at most one genuine evaluator or queued semantic boundary.
Sourcepub fn run(
&mut self,
hub: &mut InstrumentationHub,
boundary_limit: usize,
) -> Result<Vec<InterpreterBoundary>, InstrumentationError>
pub fn run( &mut self, hub: &mut InstrumentationHub, boundary_limit: usize, ) -> Result<Vec<InterpreterBoundary>, InstrumentationError>
Runs genuine boundaries until completion, suspension, an explicit pause, or the caller’s bound. This is a driver over the retained fiber, not a replay loop.
pub fn continue_execution( &mut self, hub: &InstrumentationHub, lease: &ControlLease, ) -> Result<(), InstrumentationError>
Sourcepub fn settle(
&mut self,
hub: &mut InstrumentationHub,
lease: &ControlLease,
state: PromiseState,
) -> Result<InterpreterBoundary, InstrumentationError>
pub fn settle( &mut self, hub: &mut InstrumentationHub, lease: &ControlLease, state: PromiseState, ) -> Result<InterpreterBoundary, InstrumentationError>
Settles and resumes the exact Promise/continuation retained by EvalFiber.
Auto Trait Implementations§
impl !RefUnwindSafe for InterpreterTarget
impl !Send for InterpreterTarget
impl !Sync for InterpreterTarget
impl !UnwindSafe for InterpreterTarget
impl Freeze for InterpreterTarget
impl Unpin for InterpreterTarget
impl UnsafeUnpin for InterpreterTarget
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> 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