Is it possible for sender to have a different type than receiver? It would be strange... so maybe there's a way to have a type parameter provided only once?
Not really sure whether introducing maybe_response is a good idea. Creating it causes an error reported twice: once when we create it and match Err and then here.
I don't think that's possible (that they have different types), and I'm also not sure if one could really specify the types only once. I've never seen anything like it, maybe @varun or @jon know something about this?
I agree it can, although I wouldn't call it a significant simplification, it makes this code thinner by just some words. For me, the current version is clearer but I don't mind changing it.