Closed bnjbvr closed 1 year ago
I kinda like Typed
🤷 It was taken from bevy_reflect.
DescribeType
isn't too bad and matches TypeDescriptor
.
Would it suffice that Reflect require Typed on the type it implements, instead?
You mean like trait Reflect: Typed
? I'd really like that (same for FromReflect
) but its not possible because Typed
isn't object safe, so &dyn Typed
isn't allowed.
Typed
is a bit generic, and I'm not sure how to interpret it at a first glance, since everything's typed :grinning: Would it make sense to rename it to something more precise? My thinking was that it's describing how to be part of the type graph, so maybe it could be calledTypeGraphNode
/TypeGraphNodeBuilder
(it's a mouthful), or as it relates to building the type descriptor,DescribedType
. But I don't have any particular attachment to any name, and would be curious to hear your thoughts here.Also wondering if
Reflect
should contain thetype_descriptor
API method which seems to always call into theTyped::type_descriptor
. Would it suffice thatReflect
requireTyped
on the type it implements, instead?