Use owning_ref to remove need for calling .read and .write on signals
Feature Request
I believe it should be possible using the owning-ref crate to directly implement Deref and DerefMut for Signal, allowing code like signal.mutate() instead of signal.write().mutate()
This will be a huge ergonomic win if we can get it to work!
I'm not familiar with OwningRef, but rust has a limitation that makes it impossible to both implement Copy and Drop at the same time. To safely implement Deref, Refs need to hold a lock that prevents other RefMuts from accessing the data at the same time. To release that lock when you are done using the Ref, you need to implement Drop.
Because of this I don't think it is possible to implement both Copy and Deref on Signal. (RefRef in the OwningRef crate implements Drop so it cannot implement Copy)
Ah, you're spot on. If we ever get something akin to super let it should be possible to implement something like this, but for now this seems impossible.