Skip to main content

Module context

Module context 

Source

Structs§

CancelFn
Cancels the associated Context when called.
Context
A context value carrying a cancellation signal and optional deadline.

Enums§

ContextError
Why a context was cancelled.

Functions§

background
Return a background context: it is never cancelled and has no deadline.
with_cancel
Return a child context and a cancel function.
with_deadline
Return a child context that is automatically cancelled at deadline.
with_timeout
Return a child context that is automatically cancelled after timeout.