pub enum TaskCompletion {
Completed {
text: String,
},
Failed {
message: String,
},
Cancelled,
BudgetExhausted {
message: String,
},
}Expand description
Terminal outcome of one spawned task, delivered over the completion
oneshot. Everything except Completed becomes a JS throw on the awaiting
task() call.
Variants§
Completed
The child finished; text is the full, untruncated result.
Failed
The child failed (error result, timeout, …).
Cancelled
The child was cancelled (cascade or explicit).
BudgetExhausted
The child’s budget scope drained mid-flight.
Trait Implementations§
Source§impl Clone for TaskCompletion
impl Clone for TaskCompletion
Source§fn clone(&self) -> TaskCompletion
fn clone(&self) -> TaskCompletion
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 moreSource§impl Debug for TaskCompletion
impl Debug for TaskCompletion
impl Eq for TaskCompletion
Source§impl PartialEq for TaskCompletion
impl PartialEq for TaskCompletion
Source§fn eq(&self, other: &TaskCompletion) -> bool
fn eq(&self, other: &TaskCompletion) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TaskCompletion
Auto Trait Implementations§
impl Freeze for TaskCompletion
impl RefUnwindSafe for TaskCompletion
impl Send for TaskCompletion
impl Sync for TaskCompletion
impl Unpin for TaskCompletion
impl UnsafeUnpin for TaskCompletion
impl UnwindSafe for TaskCompletion
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§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.