Closed dpc closed 3 months ago
IIUC, AccessGuard is lazy, and won't actually access the data until .value() is used.
AccessGuard
.value()
If there was an:
fn map<T, F>(self, f: F) -> AccessGuardMap<T, F> where F: FnOnce(Key) -> T;
it would be possible to implement wrappers, that could return e.g. an access to a single field, or de/serialize the value in flight, etc. preserving the lazy behavior.
Well, probably possible to implement outside all the same.
IIUC,
AccessGuard
is lazy, and won't actually access the data until.value()
is used.If there was an:
it would be possible to implement wrappers, that could return e.g. an access to a single field, or de/serialize the value in flight, etc. preserving the lazy behavior.