#[derive(Debug)]
#[must_use = "the detached entry view provides exclusive access to a retained value"]
pub struct DetachedEntryMut<'a, K, O, V> {
pub(crate) key: &'a K,
pub(crate) order: &'a O,
pub(crate) value: &'a mut V,
}
impl<'a, K, O, V> DetachedEntryMut<'a, K, O, V> {
#[must_use = "the retained key is needed to identify the detached record"]
#[inline]
pub const fn key(&self) -> &K {
self.key
}
#[must_use = "the retained order is needed to reattach the detached record"]
#[inline]
pub const fn order(&self) -> &O {
self.order
}
#[must_use = "the stored value must be observed"]
#[inline]
pub const fn value(&self) -> &V {
self.value
}
#[must_use = "the stored value must be observed or modified"]
#[inline]
pub fn value_mut(&mut self) -> &mut V {
self.value
}
#[must_use = "the stored value reference must be used"]
#[inline]
pub fn into_value_mut(self) -> &'a mut V {
self.value
}
}