pub struct AttemptCancellation { /* private fields */ }Expand description
The attempt’s cooperative cancellation signal and optional deadline.
All clones, and the ExecutionCancellation that native execution receives
through execution_cancellation, share one token. cancel is
irreversible: it stops the next native boundary from starting work and
leaves already submitted GPU work to settle, preserving cleanup and terminal
report completion.
Implementations§
Source§impl AttemptCancellation
impl AttemptCancellation
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Returns whether caller cancellation was requested or the deadline expired.
Use Self::check to distinguish the reasons.
Sourcepub fn deadline(&self) -> Option<Instant>
pub fn deadline(&self) -> Option<Instant>
Returns the absolute deadline in the process monotonic clock domain.
None means that the attempt has no deadline.
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Returns whether the optional absolute deadline has expired.
Sourcepub fn execution_cancellation(&self) -> ExecutionCancellation
pub fn execution_cancellation(&self) -> ExecutionCancellation
The same token for the native engine’s boundary checks; cancelling either side cancels both.
Trait Implementations§
Source§impl Clone for AttemptCancellation
impl Clone for AttemptCancellation
Auto Trait Implementations§
impl Freeze for AttemptCancellation
impl RefUnwindSafe for AttemptCancellation
impl Send for AttemptCancellation
impl Sync for AttemptCancellation
impl Unpin for AttemptCancellation
impl UnsafeUnpin for AttemptCancellation
impl UnwindSafe for AttemptCancellation
Blanket Implementations§
impl<T> Allocation for T
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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