pub struct HbcTarget { /* private fields */ }Expand description
One instrumentation target around the actual validated HBC machine.
Implementations§
Source§impl HbcTarget
impl HbcTarget
pub fn new( hub: &InstrumentationHub, target: TargetHandle, source_id: impl Into<String>, machine: Machine, ) -> Result<Self, InstrumentationError>
pub fn target(&self) -> &TargetHandle
pub fn status(&self) -> &'static str
pub fn paused(&self) -> bool
pub fn pending(&self) -> Option<Promise>
pub fn result(&self) -> Option<Value>
pub fn error(&self) -> Option<&str>
Sourcepub fn step(
&mut self,
hub: &mut InstrumentationHub,
) -> Result<HbcBoundary, InstrumentationError>
pub fn step( &mut self, hub: &mut InstrumentationHub, ) -> Result<HbcBoundary, InstrumentationError>
Executes one real instruction or documented transition/terminal
boundary through Machine::dispatch without eager snapshots.
pub fn run( &mut self, hub: &mut InstrumentationHub, boundary_limit: usize, ) -> Result<Vec<HbcBoundary>, InstrumentationError>
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<HbcBoundary, InstrumentationError>
pub fn settle( &mut self, hub: &mut InstrumentationHub, lease: &ControlLease, state: PromiseState, ) -> Result<HbcBoundary, InstrumentationError>
Settles the exact Promise retained at the machine’s current Await.
Auto Trait Implementations§
impl !RefUnwindSafe for HbcTarget
impl !Send for HbcTarget
impl !Sync for HbcTarget
impl !UnwindSafe for HbcTarget
impl Freeze for HbcTarget
impl Unpin for HbcTarget
impl UnsafeUnpin for HbcTarget
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