Kimundi / owning-ref-rs

A library for creating references that carry their owner with them.
MIT License
362 stars 50 forks source link

Add OwningHandle::{update, try_update} to allow modifying the stored value #21

Closed khuey closed 7 years ago

khuey commented 7 years ago

I have an OwningHandle where the value type contains a number of expensive-to-compute objects within it (as Options). They are computed from the owned value. Upon construction I want them all to be None, and I will lazily compute them when needed. deref_mut is not sufficient for this because it doesn't allow me to access the owned value again.

khuey commented 7 years ago

Didn't end up using this.