-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Labels
A-ReflectionRuntime information about typesRuntime information about typesC-FeatureA new feature, making something new possibleA new feature, making something new possibleD-ComplexQuite challenging from either a design or technical perspective. Ask for help!Quite challenging from either a design or technical perspective. Ask for help!
Description
What problem does this solve or what need does it fill?
Currently, it is non-trivial to search for and patch a specific type nested deep inside a dyn Reflect.
What solution would you like?
Add an iter_children (name bikesheddable) iterator function on Reflect that returns a ChildrenIter (name bikesheddable) over all direct children. ChildrenIter will be an enum with the same same variants as ReflectKind, but it also holds a reference to the iterator of the erased data trait.
e.g. Struct(IterFields<'a>)
This is needed for Reflect to still be object-safe.
It should also exist an iter_children_mut, which is blocked on #14846
What alternative(s) have you considered?
Writing that myself.
Metadata
Metadata
Assignees
Labels
A-ReflectionRuntime information about typesRuntime information about typesC-FeatureA new feature, making something new possibleA new feature, making something new possibleD-ComplexQuite challenging from either a design or technical perspective. Ask for help!Quite challenging from either a design or technical perspective. Ask for help!
Type
Projects
Status
Open