pub struct AttemptCancelToken { /* private fields */ }Expand description
Cooperative cancellation token passed to blocking timeout attempts.
The retry executor marks the token as cancelled when
crate::Retry::run_in_worker stops waiting for a timed-out worker thread.
The worker must check AttemptCancelToken::is_cancelled and return on its
own; Rust threads cannot be safely killed by the executor.
Implementations§
Source§impl AttemptCancelToken
impl AttemptCancelToken
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Returns whether cancellation has been requested.
§Returns
true after the executor or another holder calls
AttemptCancelToken::cancel.
Trait Implementations§
Source§impl Clone for AttemptCancelToken
impl Clone for AttemptCancelToken
Source§fn clone(&self) -> AttemptCancelToken
fn clone(&self) -> AttemptCancelToken
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AttemptCancelToken
impl Debug for AttemptCancelToken
Source§impl Default for AttemptCancelToken
impl Default for AttemptCancelToken
Source§fn default() -> AttemptCancelToken
fn default() -> AttemptCancelToken
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AttemptCancelToken
impl RefUnwindSafe for AttemptCancelToken
impl Send for AttemptCancelToken
impl Sync for AttemptCancelToken
impl Unpin for AttemptCancelToken
impl UnsafeUnpin for AttemptCancelToken
impl UnwindSafe for AttemptCancelToken
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, D> IntoConfigDefault<T> for Dwhere
D: IntoValueDefault<T>,
impl<T, D> IntoConfigDefault<T> for Dwhere
D: IntoValueDefault<T>,
Source§fn into_config_default(self) -> T
fn into_config_default(self) -> T
Converts this fallback value into
T.Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> IntoValueDefault<T> for T
impl<T> IntoValueDefault<T> for T
Source§fn into_value_default(self) -> T
fn into_value_default(self) -> T
Converts this argument into the default value.