Skip to main content

Module cancel

Module cancel 

Source
Expand description

Cooperative cancellation shared by buffered calls and streams.

A CancelToken is checked between attempts, while sleeping between retries, and before every body read. It cannot interrupt a blocking socket call that is already waiting for response headers; that wait is bounded by the response timeout.

Structs§

CancelToken
Shared cancel flag. Clones observe the same flag.

Functions§

is_cancelled_io
True when err came from a cancelled read on a stream returned by this crate.