Crate min_cancel_token

Source

Modules§

std_impl
utils
Utilities for working with cancellation tokens

Structs§

CancellationError
Error type which is returned if a cancellation token is cancelled
CancellationFunc
A function that will be executed on cancellation
CancellationGuard
Guard for a registered cancellation function
CancellationGuardVtable
UncancellableToken
An implementation of CancellationToken which will never signal the cancelled state

Constants§

CURRENT_CANCELLATION_TOKEN

Traits§

CancellationToken
A CancellationToken provides information whether a flow of execution is expected to be cancelled.

Functions§

with_cancellation_token
Replaces the currently active (thread-local) cancellation token with the provided one, and executes the given function. Once the scope ends, the current cancellation token will be reset to the previous one.
with_current_cancellation_token
Executes a function that gets access to the current cancellation token