pub struct ThreadedExecutionResult<I>where
I: Instruction,{
pub program_counter: <<I as Instruction>::Reg as Register>::Type,
pub outcome: Result<(), ExecutionError<<<I as Instruction>::Reg as Register>::Type>>,
}Expand description
Outcome of ThreadedExecutableInstruction::execute_threaded().
Unlike ExecutionResult, this is produced exactly once, by the handler that stops the chain
and is not on the per-instruction path.
For performance reasons everything inside has to fit into what the platform returns in
registers, in the shape of OpaqueThreadedExecutionResult. A caller that needs its fetcher
after execution keeps its own copy and sets the program counter to the correct value after
execution manually.
Fields§
§program_counter: <<I as Instruction>::Reg as Register>::TypeProgram counter as of the moment execution stopped
outcome: Result<(), ExecutionError<<<I as Instruction>::Reg as Register>::Type>>Why execution stopped
Implementations§
Source§impl<I> ThreadedExecutionResult<I>where
I: Instruction,
impl<I> ThreadedExecutionResult<I>where
I: Instruction,
Sourcepub const fn stopped(
program_counter: <<I as Instruction>::Reg as Register>::Type,
) -> Self
pub const fn stopped( program_counter: <<I as Instruction>::Reg as Register>::Type, ) -> Self
Execution stopped gracefully
Sourcepub const fn failed(
program_counter: <<I as Instruction>::Reg as Register>::Type,
error: ExecutionError<<<I as Instruction>::Reg as Register>::Type>,
) -> Self
pub const fn failed( program_counter: <<I as Instruction>::Reg as Register>::Type, error: ExecutionError<<<I as Instruction>::Reg as Register>::Type>, ) -> Self
Execution failed
Trait Implementations§
Auto Trait Implementations§
impl<I> Freeze for ThreadedExecutionResult<I>where
<<I as Instruction>::Reg as Register>::Type: Freeze,
Result<(), ExecutionError<<<I as Instruction>::Reg as Register>::Type>>: Freeze,
impl<I> RefUnwindSafe for ThreadedExecutionResult<I>where
<<I as Instruction>::Reg as Register>::Type: RefUnwindSafe,
Result<(), ExecutionError<<<I as Instruction>::Reg as Register>::Type>>: RefUnwindSafe,
impl<I> Send for ThreadedExecutionResult<I>where
<<I as Instruction>::Reg as Register>::Type: Send,
Result<(), ExecutionError<<<I as Instruction>::Reg as Register>::Type>>: Send,
impl<I> Sync for ThreadedExecutionResult<I>where
<<I as Instruction>::Reg as Register>::Type: Sync,
Result<(), ExecutionError<<<I as Instruction>::Reg as Register>::Type>>: Sync,
impl<I> Unpin for ThreadedExecutionResult<I>where
<<I as Instruction>::Reg as Register>::Type: Unpin,
Result<(), ExecutionError<<<I as Instruction>::Reg as Register>::Type>>: Unpin,
impl<I> UnsafeUnpin for ThreadedExecutionResult<I>where
<<I as Instruction>::Reg as Register>::Type: UnsafeUnpin,
Result<(), ExecutionError<<<I as Instruction>::Reg as Register>::Type>>: UnsafeUnpin,
impl<I> UnwindSafe for ThreadedExecutionResult<I>where
<<I as Instruction>::Reg as Register>::Type: UnwindSafe,
Result<(), ExecutionError<<<I as Instruction>::Reg as Register>::Type>>: UnwindSafe,
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