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.
I have an
OwningHandle
where the value type contains a number of expensive-to-compute objects within it (asOption
s). They are computed from the owned value. Upon construction I want them all to beNone
, 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.