pub struct Context<E: TError> { /* private fields */ }Implementations§
Source§impl<E: TError> Context<E>
impl<E: TError> Context<E>
pub fn id(&self) -> u32
pub fn wait_for(&self, state: State) -> FutureTaskState<E>
pub fn stop(&self) -> FutureTaskState<E>
pub fn is_active(&self) -> bool
pub fn stop_with_err(&self, err: E) -> FutureTaskState<E>
pub fn spawn<F>(&self, fut: F) -> JoinHandle<Result<F::Output, TaskError<E>>> ⓘ
pub fn spawn_blocking<F, R>(&self, f: F) -> JoinHandle<Result<R, TaskError<E>>> ⓘ
Trait Implementations§
Auto Trait Implementations§
impl<E> Freeze for Context<E>
impl<E> RefUnwindSafe for Context<E>
impl<E> Send for Context<E>
impl<E> Sync for Context<E>
impl<E> Unpin for Context<E>
impl<E> UnwindSafe for Context<E>
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