tmi 0.10.0

twitch.tv messaging interface
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::future::Future;
use std::time::Duration;

pub trait Timeout: Sized {
  fn timeout(self, duration: Duration) -> tokio::time::Timeout<Self>;
}

impl<F> Timeout for F
where
  F: Future,
{
  fn timeout(self, duration: Duration) -> tokio::time::Timeout<Self> {
    tokio::time::timeout(duration, self)
  }
}