This was insanely hard not due to anything other than lack of
familiarity with futures-rs. It's unfortunate that so much of being able
to use it correctly requires knowledge of futures-rs and not rust
itself. e.g. it is not possible to implement this solution with pattern
matching, usage of futures::future::result() is instead required.
See https://github.com/alexcrichton/futures-rs/issues/551