#[repr(C)]pub enum CoroutineState<Y, R>{
Created,
Ready,
Running,
Suspend(Y, u64),
SystemCall(Y, Syscall, SyscallState),
Complete(R),
Error(&'static str),
}
Expand description
Enums used to describe coroutine state
Variants§
Created
The coroutine is created.
Ready
The coroutine is ready to run.
Running
The coroutine is running.
Suspend(Y, u64)
The coroutine resumes execution after the specified time has been suspended(with a given value).
SystemCall(Y, Syscall, SyscallState)
The coroutine enters the system call.
Complete(R)
The coroutine completed with a return value.
Error(&'static str)
The coroutine completed with a error message.
Trait Implementations§
source§impl<Y, R> Clone for CoroutineState<Y, R>
impl<Y, R> Clone for CoroutineState<Y, R>
source§fn clone(&self) -> CoroutineState<Y, R>
fn clone(&self) -> CoroutineState<Y, R>
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<Y, R> Debug for CoroutineState<Y, R>
impl<Y, R> Debug for CoroutineState<Y, R>
source§impl<Y, R> Display for CoroutineState<Y, R>
impl<Y, R> Display for CoroutineState<Y, R>
source§impl<Y, R> PartialEq for CoroutineState<Y, R>
impl<Y, R> PartialEq for CoroutineState<Y, R>
source§fn eq(&self, other: &CoroutineState<Y, R>) -> bool
fn eq(&self, other: &CoroutineState<Y, R>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<Y, R> Copy for CoroutineState<Y, R>
impl<Y, R> Eq for CoroutineState<Y, R>
impl<Y, R> StructuralEq for CoroutineState<Y, R>
impl<Y, R> StructuralPartialEq for CoroutineState<Y, R>
Auto Trait Implementations§
impl<Y, R> RefUnwindSafe for CoroutineState<Y, R>where
R: RefUnwindSafe,
Y: RefUnwindSafe,
impl<Y, R> Send for CoroutineState<Y, R>
impl<Y, R> Sync for CoroutineState<Y, R>
impl<Y, R> Unpin for CoroutineState<Y, R>
impl<Y, R> UnwindSafe for CoroutineState<Y, R>where
R: UnwindSafe,
Y: 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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more