pub enum ThreadStatus {
NotStarted,
Running,
ResumePending(Option<usize>),
YieldPending(Option<usize>),
Dead,
}Variants§
NotStarted
thread is not started yet
Running
thread is running. it is not pending on any operation.
ResumePending(Option<usize>)
thread is running, and it is pending on resume.
value is the expected number of return values from resume.
YieldPending(Option<usize>)
thread is not running, and it is pending on yield.
that is, the thread is waiting for any parent coroutine to resume.
value is the expected number of return values from yield.
Dead
thread is dead, and it is not running anymore.
Implementations§
source§impl ThreadStatus
impl ThreadStatus
pub fn is_started(&self) -> bool
pub fn is_dead(&self) -> bool
pub fn is_yield_pending(&self) -> bool
pub fn is_resume_pending(&self) -> bool
Trait Implementations§
source§impl Clone for ThreadStatus
impl Clone for ThreadStatus
source§fn clone(&self) -> ThreadStatus
fn clone(&self) -> ThreadStatus
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for ThreadStatus
impl Debug for ThreadStatus
source§impl Ord for ThreadStatus
impl Ord for ThreadStatus
source§fn cmp(&self, other: &ThreadStatus) -> Ordering
fn cmp(&self, other: &ThreadStatus) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for ThreadStatus
impl PartialEq for ThreadStatus
source§impl PartialOrd for ThreadStatus
impl PartialOrd for ThreadStatus
impl Copy for ThreadStatus
impl Eq for ThreadStatus
impl StructuralPartialEq for ThreadStatus
Auto Trait Implementations§
impl Freeze for ThreadStatus
impl RefUnwindSafe for ThreadStatus
impl Send for ThreadStatus
impl Sync for ThreadStatus
impl Unpin for ThreadStatus
impl UnwindSafe for ThreadStatus
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.