Closed 50U10FCA7 closed 1 year ago
Add generic reflection over event names and versions (#6)
- add `es::event::reflect::Name` and `es::event::reflect::Revision` in `arcane-core` crate
- replace `es::event::codegen::Reflect` with `es::event::codegen::Meta` in `arcane-core` crate
Discussed:
es::event::reflect
modulees::event::Meta { name: Name, revision: Revision }
structes::event::reflect::Meta { const META: &'static [Meta] }
traites::event::reflect::Meta
in es::Event
, es::event::Revised
derive macroses::event::VersionedNames
, es::event::codegen::VersionedNamesIterator
To discuss:
ack @tyranron
@tyranron Meta is now represented as separated traits because we need to know the type of event revision (which requires Revisable
bound).
Requires #7
Synopsis
At now, codegen machinery expands into non-generic code for handling
event::Name
s andevent::Revision
s.Solution
Provide two traits to add generic reflection:
event::codegen::Meta
for internal purposes (checking the name+ver collisions);event::reflect::Meta
for public API, allowing to reflect overevent::Meta
s.and one struct:
event::Meta
as a meta information ofEvent
(event::Name
andevent::Revision
)Checklist
k::
labels applied