runtime_raw/
time.rs

1use std::fmt::Debug;
2use std::future::Future;
3use std::time::Instant;
4
5use futures::Stream;
6
7/// A future representing the notification that an elapsed duration has occurred.
8pub trait Delay: Future<Output = Instant> + Debug + Send {}
9
10/// A stream representing notifications at a fixed interval.
11pub trait Interval: Stream<Item = Instant> + Debug + Send {}