Representing closed trait objects as enums

This seems similar/related to the sealed traits pre-rfc.