pub enum StepResult {
Continue,
NewRunnable(Box<dyn Runnable>),
ReplaceRunnable(Box<dyn Runnable>),
SpawnRunnable(Box<Task>),
Return(Box<OnionStaticObject>),
Error(RuntimeError),
}
Expand description
步骤执行结果类型。
用于描述一次 step 调用后的调度决策。
Variants§
Continue
继续当前任务
NewRunnable(Box<dyn Runnable>)
生成一个新的 Runnable 并压栈
ReplaceRunnable(Box<dyn Runnable>)
替换当前 Runnable
SpawnRunnable(Box<Task>)
生成一个新的异步任务(如协程)
Return(Box<OnionStaticObject>)
返回结果并结束当前任务
Error(RuntimeError)
发生错误
Auto Trait Implementations§
impl Freeze for StepResult
impl !RefUnwindSafe for StepResult
impl Send for StepResult
impl Sync for StepResult
impl Unpin for StepResult
impl !UnwindSafe for StepResult
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