1mod futures_map;
2mod futures_set;
3mod futures_tuple_set;
4mod stream_map;
5mod stream_set;
6
7pub use futures_map::FuturesMap;
8pub use futures_set::FuturesSet;
9pub use futures_tuple_set::FuturesTupleSet;
10pub use stream_map::StreamMap;
11pub use stream_set::StreamSet;
12
13use std::fmt;
14use std::fmt::Formatter;
15use std::time::Duration;
16
17#[derive(Debug)]
19pub struct Timeout {
20 limit: Duration,
21}
22
23impl Timeout {
24 fn new(duration: Duration) -> Self {
25 Self { limit: duration }
26 }
27}
28
29impl fmt::Display for Timeout {
30 fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
31 write!(f, "future failed to complete within {:?}", self.limit)
32 }
33}
34
35#[derive(PartialEq, Debug)]
37pub enum PushError<T> {
38 BeyondCapacity(T),
40 Replaced(T),
44}
45
46impl std::error::Error for Timeout {}