Right now events are declared as individual structs. This is not optimal because it wastes space and doesn't enforce grouping all events in one place. What we should to instead is define them just as the Error type as a single enum. The codegen should make sure that only struct like variants are used so that all fields are properly named.