1 2 3 4 5 6 7 8 9 10 11 12 13
use futures::Stream; pub trait IntoStream { type Stream: Stream; fn into_stream(self) -> Self::Stream; } pub trait Timeout { type Stream: Stream; fn timeout(self, secs: u64) -> Self::Stream; }