pub struct CancelToken { /* private fields */ }Expand description
Cooperative cancellation token passed into background LaunchedEffect work.
The token flips to “cancelled” when the associated scope leaves composition.
Callers should periodically check CancelToken::is_cancelled in long-running
operations and exit early; blocking I/O will not be interrupted automatically.
Implementations§
Source§impl CancelToken
impl CancelToken
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CancelToken
impl RefUnwindSafe for CancelToken
impl Send for CancelToken
impl Sync for CancelToken
impl Unpin for CancelToken
impl UnsafeUnpin for CancelToken
impl UnwindSafe for CancelToken
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