aitch icon indicating copy to clipboard operation
aitch copied to clipboard

Should there be a generic Server trait?

Open mjkillough opened this issue 6 years ago • 0 comments

We currently have implementations for two back-ends: Hyper and HTTP. Both expose a Server struct with a common interface.

So far they do not share a trait, but perhaps they should? Would this limit us from supporting other back-ends in the future, if they're unable to implement the trait for whatever reason? (Maybe they can't get the local addr they're bound to).

Would applications ever want to be generic over the server back-end used? That would be the biggest motivating factor for adding a trait.

mjkillough avatar Jul 21 '18 22:07 mjkillough