#[repr(i8)]pub enum RustTaskCallbackCode {
Success = 0,
Cancelled = 1,
}
Expand description
Passed to a RustTaskCallback
function when the executor invokes them.
Every RustTaskCallback
will be invoked eventually, this code is used to distinguish the times
when it’s invoked successfully vs times when the callback is being called because the foreign
executor has been cancelled / shutdown
Variants§
Success = 0
Successful task callback invocation
Cancelled = 1
The ForeignExecutor
has been cancelled.
This signals that any progress using the executor should be halted. In particular, Futures should not continue to progress.
Trait Implementations§
Source§impl Debug for RustTaskCallbackCode
impl Debug for RustTaskCallbackCode
Source§impl PartialEq for RustTaskCallbackCode
impl PartialEq for RustTaskCallbackCode
impl Eq for RustTaskCallbackCode
impl StructuralPartialEq for RustTaskCallbackCode
Auto Trait Implementations§
impl Freeze for RustTaskCallbackCode
impl RefUnwindSafe for RustTaskCallbackCode
impl Send for RustTaskCallbackCode
impl Sync for RustTaskCallbackCode
impl Unpin for RustTaskCallbackCode
impl UnwindSafe for RustTaskCallbackCode
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