I have a future that I’m trying to store in a custom combinator. It’s always the same type: tokio::timer::Delay
with an error mapped to ()
(for simplicity’s sake, though I may want to change this later).
let expire = Delay::new(expiry_time)
.map_err(|_| ());
I don’t know how to store this. Its type is MapErr<Delay, [closure]>
, and when I try to box the closure, it won’t work with the map_err
function.