Enum CancellationOutcome
pub enum CancellationOutcome {
Cancelled,
Completed,
TargetAbsent,
Failed(CancellationError),
}Expand description
取消等待(cancellation wait)的控制结果,绝不领取业务输出(output)。
Variants§
Cancelled
目标因取消退出,且原异步计算(Future)合法析构(drop)已完成。
Completed
目标正常完成,且原异步计算(Future)合法析构(drop)已完成。
TargetAbsent
外部按身份查找时可靠证明目标不存在;有效强句柄不凭空返回此值。
Failed(CancellationError)
本次操作失败,立即完成,不继续等待目标退出。
Trait Implementations§
Source§impl Clone for CancellationOutcome
impl Clone for CancellationOutcome
Source§fn clone(&self) -> CancellationOutcome
fn clone(&self) -> CancellationOutcome
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CancellationOutcome
Source§impl Debug for CancellationOutcome
impl Debug for CancellationOutcome
impl Eq for CancellationOutcome
Source§impl PartialEq for CancellationOutcome
impl PartialEq for CancellationOutcome
impl StructuralPartialEq for CancellationOutcome
Auto Trait Implementations§
impl Forget for CancellationOutcome
impl Freeze for CancellationOutcome
impl Move for CancellationOutcome
impl RefUnwindSafe for CancellationOutcome
impl Send for CancellationOutcome
impl Sync for CancellationOutcome
impl Unpin for CancellationOutcome
impl UnsafeUnpin for CancellationOutcome
impl UnwindSafe for CancellationOutcome
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