Implement static from(...) on enumerated types