use Duration;
use TryFutureExt;
use crateFuture;
use crateio;
/// Awaits an I/O future or times out after a duration of time.
///
/// # Examples
///
/// ```no_run
/// # fn main() -> std::io::Result<()> { async_std::task::block_on(async {
/// #
/// use std::time::Duration;
///
/// use async_std::io;
///
/// io::timeout(Duration::from_secs(5), async {
/// let stdin = io::stdin();
/// let mut line = String::new();
/// let n = stdin.read_line(&mut line).await?;
/// Ok(())
/// })
/// .await?;
/// #
/// # Ok(()) }) }
/// ```
pub async