pub struct Cancelled;Expand description
Returned by WorkerCtx::barrier / CoordinatorCtx::barrier when
the tasklet is cancelled while waiting on the barrier.
This mirrors [super::guest::Cancelled] on the wasm32 guest so that
source code written as w.barrier()? compiles unchanged against
either target. The host mock currently models cancellation with the
same Arc<AtomicBool> that backs CoordinatorCtx::cancel and
WorkerCtx::cancelled: after the underlying std::sync::Barrier
releases, we re-check the flag and surface Err(Cancelled) if set.
This is not a fully faithful simulation of a racing cancel mid-wait
— the mock cannot unstick a std::sync::Barrier that never
quorums — but it is sufficient for the “programmer writes
barrier()? and the type checks” source-parity goal.
Trait Implementations§
Source§impl From<Cancelled> for TaskletError
impl From<Cancelled> for TaskletError
impl Copy for Cancelled
impl Eq for Cancelled
impl StructuralPartialEq for Cancelled
Auto Trait Implementations§
impl Freeze for Cancelled
impl RefUnwindSafe for Cancelled
impl Send for Cancelled
impl Sync for Cancelled
impl Unpin for Cancelled
impl UnwindSafe for Cancelled
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