A Rust crate for creating a shared timeout. A sample use case is having multiple streams open from the client, and expiring them only when all of them stopped sending data. Another example is a proxy with a timeout - the proxy times out only when both the local and the remote ends time out.
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 asyncRead/Writetrait support for the wrapper (reset the timer upon successful read/write operations)stream- enableStreamsupport for the wrapper (reset the timer upon stream advancement).
Integration with other runtimes
std(enabled by default) - enablestdintegration. Currently it's only used to enableArcandAsRawFdsupport for the wrapper.tokio(enabled by default) -tokiosupportasync-io- supportasync-ioas the timer runtime.futures-io- supportfutures-iotraits.async-std-async-stdsupport (enablesasync-ioandfutures-io).
- 0.1.0 - initial release
- 0.1.1 -
AsRawFdsupport forWrapper - 0.2.0 - minor API cleanup
- 0.2.1 - updated dependencies, added
Timeout::new_tokio - 0.2.2 - add
TokioTimeoutandTokioWrappertype aliases
TL;DR do whatever you want.
Licensed under either the BSD Zero Clause License (https://opensource.org/licenses/0BSD), the Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0) or the MIT License (http://opensource.org/licenses/MIT), at your choice.