Expand description

A crate that offers a way to create a timeout that can be reset and shared. Additionally, stream timeout is offered under a feature flag.

§Feature flags:

Wrapper

  • wrapper - enable a wrapper around types that you can use for easier resetting. By default, only future support is enabled (reset the timer upon future completion).
  • read-write - enable async Read/Write trait support for the wrapper (reset the timer upon successful read/write operations)
  • stream - enable Stream support for the wrapper (reset the timer upon stream advancement).

Integration with other runtimes

  • std (enabled by default) - enable std integration. Currently it’s only used to enable Arc and AsRawFd support for the wrapper.
  • tokio (enabled by default) - tokio support
  • async-io - support async-io as the timer runtime.
  • futures-io - support futures-io traits.
  • async-std - async-std support (enables async-io and futures-io).

See struct documentation for examples.

Modules§

  • Traits needed for runtime-agnostic time measurement and sleeping

Structs§

  • A shared timeout.
  • A wrapper that wraps a future, a stream or an async reader/writer and resets the timeout upon a new event.

Type Aliases§