smol-timeout
A way to poll a future until it or a timer completes.
Example
use Timer;
use TimeoutExt;
use Duration;
let foo = async ;
let foo = foo.timeout;
assert_eq!;
let bar = async ;
let bar = bar.timeout;
assert_eq!;
License
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.