pub struct NoReentry;Expand description
A Reentry for a caller that has no interpreter to reenter.
HostRegistry::call uses it, so a host that never runs a callback can
still be driven from a test or a tool with no program behind it. An
operation that does need one is told what is missing rather than being
handed a closure it cannot run.
Trait Implementations§
Source§impl Reentry for NoReentry
impl Reentry for NoReentry
Source§fn time_left(&self) -> Option<Duration>
fn time_left(&self) -> Option<Duration>
A caller with no run behind it has no deadline to run out of, so a host driven from a test or a tool waits for as long as its own limits allow and no less.
Source§fn task(&self) -> u64
fn task(&self) -> u64
A caller with no program behind it made the call the way an entry makes one: outside any spawned task.
Source§fn call_until(
&mut self,
callee: &Value,
args: Vec<Value>,
_stop: &Cancellation,
) -> Result<Value, RuntimeError>
fn call_until( &mut self, callee: &Value, args: Vec<Value>, _stop: &Cancellation, ) -> Result<Value, RuntimeError>
Calls
callee with args, stopping it at its next safepoint if
stop is raised while it runs. Read moreSource§fn is_cancelled(&self) -> bool
fn is_cancelled(&self) -> bool
Whether the work that made this host call has been asked to stop. Read more
Auto Trait Implementations§
impl Freeze for NoReentry
impl RefUnwindSafe for NoReentry
impl Send for NoReentry
impl Sync for NoReentry
impl Unpin for NoReentry
impl UnsafeUnpin for NoReentry
impl UnwindSafe for NoReentry
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