Open Phoqinu opened 1 month ago
If this gets approved and it will be easy to impl as I offered in What solution would you like?
then I would like to take it :)
I'm a bit nervous about this, because it's very implementation focused, rather than motivation focused [6:40 PM]Alice 🌹: There are a lot of reasonable things that you might want to do with this access! [6:41 PM]Alice 🌹: But unless that's actually written up in the issue and PR, it's going to be hard to find the right design [6:41 PM]Alice 🌹: And liable to getting reverted by mistake
What problem does this solve or what need does it fill?
Systems part of
Schedule
can be accessed and "inspected". That is you can get some info of the system fromSystem
trait. But registered systems are opaque because their storage is private. They exist as entities and are stored insideRegisteredSystem
component.What solution would you like?
Make the
RegisteredSystem
componentpub
(and re-export it ?) and add method to borrow stored systempub fn system_ref(&self) -> &BoxedSystem<I, O>;
orpub fn system_ref(&self) -> &dyn System<In = I, Out = O>;
What alternative(s) have you considered?
EDIT: If users should have same rights as bevy then I think it should be pub and it's members too. Then there would be no need to system getter. Or maybe add method which converts
RegisteredSystem
toRemovedSystem
?pub fn remove(self) -> RemovedSystem;
Which one ?
Additional context
None.