pub struct SweepControl { /* private fields */ }Expand description
Pause, resume and abort switch for a sweep, shared by clones.
Executors call Self::proceed between slices of steps. An abort is final.
Implementations§
Source§impl SweepControl
impl SweepControl
Sourcepub fn pause(&self)
pub fn pause(&self)
Holds every run at its next slice. Note that a pause after an abort changes nothing.
Sourcepub fn is_aborted(&self) -> bool
pub fn is_aborted(&self) -> bool
Returns whether the sweep is aborted.
Sourcepub fn proceed(&self) -> bool
pub fn proceed(&self) -> bool
Returns whether a run can take its next slice, blocking while the sweep is paused.
Returns false once the sweep is aborted.
§Panics
Panics or traps on wasm32 while the sweep is paused on a thread that cannot wait, such as a browser’s main
thread. A host on wasm32 reads Self::is_paused between slices instead.
Trait Implementations§
Source§impl Clone for SweepControl
impl Clone for SweepControl
Source§impl Debug for SweepControl
impl Debug for SweepControl
Auto Trait Implementations§
impl Freeze for SweepControl
impl RefUnwindSafe for SweepControl
impl Send for SweepControl
impl Sync for SweepControl
impl Unpin for SweepControl
impl UnsafeUnpin for SweepControl
impl UnwindSafe for SweepControl
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more