Struct VacantEntry

pub struct VacantEntry<'a, K, V> { /* private fields */ }

A vacant Entry. It is part of the Entry enum.

Implementations

impl<'a, K: Ord, V> VacantEntry<'a, K, V>

fn key(&self) -> &K

Gets a reference to the key that would be used when inserting a value through the VacantEntry.

fn insert(self, value: V) -> &'a mut V

Sets the value of the entry with the VacantEntry's key, and returns a mutable reference to it.

Auto Trait Implementations

impl<'a, K, V> !UnwindSafe for VacantEntry<'a, K, V>

impl<'a, K, V> Freeze for VacantEntry<'a, K, V> where VacantEntry<'a, K, V>: Freeze,

impl<'a, K, V> RefUnwindSafe for VacantEntry<'a, K, V> where VacantEntry<'a, K, V>: RefUnwindSafe,

impl<'a, K, V> Send for VacantEntry<'a, K, V> where VacantEntry<'a, K, V>: Send,

impl<'a, K, V> Sync for VacantEntry<'a, K, V> where VacantEntry<'a, K, V>: Sync,

impl<'a, K, V> Unpin for VacantEntry<'a, K, V> where VacantEntry<'a, K, V>: Unpin,

impl<'a, K, V> UnsafeUnpin for VacantEntry<'a, K, V> where VacantEntry<'a, K, V>: UnsafeUnpin,

Blanket Implementations

impl<T> Any for VacantEntry<'a, K, V> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for VacantEntry<'a, K, V> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for VacantEntry<'a, K, V> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for VacantEntry<'a, K, V>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into<U> for VacantEntry<'a, K, V> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for VacantEntry<'a, K, V> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for VacantEntry<'a, K, V> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>