pub struct FlagCancel(pub Arc<AtomicBool>);Expand description
Shared flag for tests and embedders that flip cancellation mid-operation.
Tuple Fields§
§0: Arc<AtomicBool>Implementations§
Trait Implementations§
Source§impl Cancel for FlagCancel
impl Cancel for FlagCancel
Source§fn is_cancelled(&self) -> bool
fn is_cancelled(&self) -> bool
Returns
true once the operation should stop as soon as possible.When cancellation is backed by a shared flag (for example
FlagCancel), returns it
so worker threads can observe the same signal.Source§impl Clone for FlagCancel
impl Clone for FlagCancel
Source§impl Debug for FlagCancel
impl Debug for FlagCancel
Auto Trait Implementations§
impl Freeze for FlagCancel
impl RefUnwindSafe for FlagCancel
impl Send for FlagCancel
impl Sync for FlagCancel
impl Unpin for FlagCancel
impl UnsafeUnpin for FlagCancel
impl UnwindSafe for FlagCancel
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