pub struct DelayedCallbacks {
callbacks: RefCell<Vec<Box<dyn for<'tcx> FnOnce(&mut MiriInterpCx<'tcx>) -> InterpResult<'tcx>>>>,
}Expand description
When we need to perform an operation but don’t have an ecx around to run it immediately, we
can register a callback here and it will be invoked on the next scheduler call.
Fields§
§callbacks: RefCell<Vec<Box<dyn for<'tcx> FnOnce(&mut MiriInterpCx<'tcx>) -> InterpResult<'tcx>>>>Implementations§
Source§impl DelayedCallbacks
impl DelayedCallbacks
Sourcepub fn add(
&self,
callback: Box<dyn for<'tcx> FnOnce(&mut MiriInterpCx<'tcx>) -> InterpResult<'tcx>>,
)
pub fn add( &self, callback: Box<dyn for<'tcx> FnOnce(&mut MiriInterpCx<'tcx>) -> InterpResult<'tcx>>, )
Register a callback to be invoked the next time the current thread yields/blocks.
fn process<'tcx>(ecx: &mut MiriInterpCx<'tcx>) -> InterpResult<'tcx>
Trait Implementations§
Source§impl Debug for DelayedCallbacks
impl Debug for DelayedCallbacks
Auto Trait Implementations§
impl !DynSend for DelayedCallbacks
impl !DynSync for DelayedCallbacks
impl !Freeze for DelayedCallbacks
impl !RefUnwindSafe for DelayedCallbacks
impl !Send for DelayedCallbacks
impl !Sync for DelayedCallbacks
impl !UnwindSafe for DelayedCallbacks
impl Forget for DelayedCallbacks
impl Move for DelayedCallbacks
impl Unpin for DelayedCallbacks
impl UnsafeUnpin for DelayedCallbacks
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes