pub(super) struct RawTableEntry<'a, K, V> {
map: &'a mut IndexMapCore<K, V>,
raw_bucket: Bucket<usize>,
}
Expand description
A view into an occupied raw entry in an IndexMap
.
Fields§
§map: &'a mut IndexMapCore<K, V>
§raw_bucket: Bucket<usize>
Implementations§
source§impl<'a, K, V> RawTableEntry<'a, K, V>
impl<'a, K, V> RawTableEntry<'a, K, V>
sourceunsafe fn new(
map: &'a mut IndexMapCore<K, V>,
raw_bucket: Bucket<usize>,
) -> Self
unsafe fn new( map: &'a mut IndexMapCore<K, V>, raw_bucket: Bucket<usize>, ) -> Self
The caller must ensure that the raw_bucket
is valid in the given map
,
and then we hold the &mut
reference for exclusive access.
pub(super) fn bucket(&self) -> &Bucket<K, V>
pub(super) fn bucket_mut(&mut self) -> &mut Bucket<K, V>
pub(super) fn into_bucket(self) -> &'a mut Bucket<K, V>
sourcepub(super) fn remove_index(self) -> (&'a mut IndexMapCore<K, V>, usize)
pub(super) fn remove_index(self) -> (&'a mut IndexMapCore<K, V>, usize)
Remove the index from indices, leaving the actual entries to the caller.
sourcepub(super) fn into_inner(self) -> (&'a mut IndexMapCore<K, V>, usize)
pub(super) fn into_inner(self) -> (&'a mut IndexMapCore<K, V>, usize)
Take no action, just return the index and the original map reference.
Trait Implementations§
Auto Trait Implementations§
impl<'a, K, V> Freeze for RawTableEntry<'a, K, V>
impl<'a, K, V> RefUnwindSafe for RawTableEntry<'a, K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<'a, K, V> Send for RawTableEntry<'a, K, V>
impl<'a, K, V> Unpin for RawTableEntry<'a, K, V>
impl<'a, K, V> !UnwindSafe for RawTableEntry<'a, K, V>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more