mm1-common 0.7.22

An Erlang-style actor runtime for Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use std::future::IntoFuture;
use std::time::Duration;

use tokio::time;

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

impl<F> FutureTimeoutExt for F where F: IntoFuture {}