pub struct VacantEntry<'a, K, V, S, A, P>{ /* private fields */ }Expand description
A view into a vacant entry in an AugmentedRBTree.
Implementations§
Source§impl<'a, K, V, S, A, P> VacantEntry<'a, K, V, S, A, P>
impl<'a, K, V, S, A, P> VacantEntry<'a, K, V, S, A, P>
Sourcepub fn key(&self) -> &K
pub fn key(&self) -> &K
Gets a reference to the key that would be used when inserting a value through the VacantEntry.
Sourcepub fn try_insert(self, value: V) -> Result<&'a mut V, OutOfMemoryError>where
P: TreePolicy<K = K, V = V, S = S>,
pub fn try_insert(self, value: V) -> Result<&'a mut V, OutOfMemoryError>where
P: TreePolicy<K = K, V = V, S = S>,
Try to insert a value with the VacantEntry’s key, and returns a mutable reference
to it.
§Errors
Returns an OutOfMemoryError if the allocation fails.
Trait Implementations§
Auto Trait Implementations§
impl<'a, K, V, S, A, P> !UnwindSafe for VacantEntry<'a, K, V, S, A, P>
impl<'a, K, V, S, A, P> Freeze for VacantEntry<'a, K, V, S, A, P>where
K: Freeze,
impl<'a, K, V, S, A, P> RefUnwindSafe for VacantEntry<'a, K, V, S, A, P>
impl<'a, K, V, S, A, P> Send for VacantEntry<'a, K, V, S, A, P>
impl<'a, K, V, S, A, P> Sync for VacantEntry<'a, K, V, S, A, P>
impl<'a, K, V, S, A, P> Unpin for VacantEntry<'a, K, V, S, A, P>where
K: Unpin,
impl<'a, K, V, S, A, P> UnsafeUnpin for VacantEntry<'a, K, V, S, A, P>where
K: UnsafeUnpin,
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