aitch
aitch copied to clipboard
Should there be a generic Server trait?
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.