pub struct ExecutionContext { /* private fields */ }Expand description
Observes progress and allows cooperative cancellation of long-running boolean evaluations. See the module docs for usage.
Implementations§
Source§impl ExecutionContext
impl ExecutionContext
Sourcepub fn cancel(&self)
pub fn cancel(&self)
Request cancellation of any in-flight evaluation observing this
context. Sticky: once called, is_cancelled
returns true for the rest of the context’s lifetime.
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Returns true if cancel has been called.
Sourcepub fn progress(&self) -> f64
pub fn progress(&self) -> f64
Progress of an in-flight evaluation as a fraction in [0.0, 1.0].
Meaningful only after this context has been attached to a manifold
via Manifold::with_context and an
eager op has started. For an unattached context, upstream reads
1.0 (“nothing in flight, complete”).
Trait Implementations§
Source§impl Default for ExecutionContext
impl Default for ExecutionContext
Source§impl Drop for ExecutionContext
impl Drop for ExecutionContext
impl Send for ExecutionContext
impl Sync for ExecutionContext
Auto Trait Implementations§
impl Freeze for ExecutionContext
impl RefUnwindSafe for ExecutionContext
impl Unpin for ExecutionContext
impl UnsafeUnpin for ExecutionContext
impl UnwindSafe for ExecutionContext
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.