pub struct TaskContext { /* private fields */ }Expand description
Cooperative execution context supplied to a task callback.
Implementations§
Source§impl TaskContext
impl TaskContext
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Reports whether task or scheduler cancellation was requested.
Sourcepub fn trace(&self) -> Option<&TraceContext>
pub fn trace(&self) -> Option<&TraceContext>
Returns propagated trace context.
Auto Trait Implementations§
impl Freeze for TaskContext
impl RefUnwindSafe for TaskContext
impl Send for TaskContext
impl Sync for TaskContext
impl Unpin for TaskContext
impl UnsafeUnpin for TaskContext
impl UnwindSafe for TaskContext
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