Struct sentry_types::protocol::v7::map::VacantEntry [−][src]
pub struct VacantEntry<'a, K, V, S = RandomState> where
K: 'a,
S: 'a,
V: 'a, { /* fields omitted */ }
A view into a single empty location in a LinkedHashMap
.
Methods
impl<'a, K, V, S> VacantEntry<'a, K, V, S> where
K: 'a + Eq + Hash,
S: BuildHasher,
V: 'a,
[src]
impl<'a, K, V, S> VacantEntry<'a, K, V, S> where
K: 'a + Eq + Hash,
S: BuildHasher,
V: 'a,
ⓘImportant traits for &'a mut Rpub fn key(&self) -> &K
[src]
ⓘImportant traits for &'a mut R
pub fn key(&self) -> &K
Gets a reference to the entry key
Examples
use linked_hash_map::LinkedHashMap; let mut map = LinkedHashMap::<String, u32>::new(); assert_eq!("foo", map.entry("foo".to_string()).key());
ⓘImportant traits for &'a mut Rpub fn insert(self, value: V) -> &'a mut V
[src]
ⓘImportant traits for &'a mut R
pub 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, S> Send for VacantEntry<'a, K, V, S> where
K: Send,
S: Send,
V: Send,
impl<'a, K, V, S> Send for VacantEntry<'a, K, V, S> where
K: Send,
S: Send,
V: Send,
impl<'a, K, V, S> Sync for VacantEntry<'a, K, V, S> where
K: Sync,
S: Sync,
V: Sync,
impl<'a, K, V, S> Sync for VacantEntry<'a, K, V, S> where
K: Sync,
S: Sync,
V: Sync,