diwic / reffers-rs

Rust wrappers around references, boxes and Arcs.
68 stars 3 forks source link

Mutable support? #13

Open Lupus opened 3 weeks ago

Lupus commented 3 weeks ago

Since both Mutex and RWLock can be used to get mutable reference, is it possible to extend ARef to support getting mutable references as well?

diwic commented 3 weeks ago

Hi! I don't think it's possible to extend Aref, but maybe it's possible to make an ArefMut one by copy-pasting much of the aref code. It is nothing I have time to look into myself at the moment, but I can review PRs if you make them.