pub struct Thread<'mir, 'tcx> {
    state: ThreadState,
    thread_name: Option<Vec<u8>>,
    stack: Vec<Frame<'mir, 'tcx, Provenance, FrameData<'tcx>>>,
    join_status: ThreadJoinStatus,
    pub(crate) panic_payload: Option<Scalar<Provenance>>,
    pub(crate) last_error: Option<MPlaceTy<'tcx, Provenance>>,
}
Expand description

A thread.

Fields

state: ThreadStatethread_name: Option<Vec<u8>>

Name of the thread.

stack: Vec<Frame<'mir, 'tcx, Provenance, FrameData<'tcx>>>

The virtual call stack.

join_status: ThreadJoinStatus

The join status.

panic_payload: Option<Scalar<Provenance>>

The temporary used for storing the argument of the call to miri_start_panic (the panic payload) when unwinding. This is pointer-sized, and matches the Payload type in src/libpanic_unwind/miri.rs.

last_error: Option<MPlaceTy<'tcx, Provenance>>

Last OS error location in memory. It is a 32-bit integer.

Implementations

Check if the thread is done executing (no more stack frames). If yes, change the state to terminated and return true.

Get the name of the current thread, or <unnamed> if it was not set.

Trait Implementations

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

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: 184 bytes