&self.key
}
+ /// Take ownership of the key.
+ #[unstable(feature = "map_entry_recover_keys", issue = "34285")]
+ pub fn into_key(self) -> K {
+ self.key
+ }
+
/// Sets the value of the entry with the VacantEntry's key,
/// and returns a mutable reference to it.
#[stable(feature = "rust1", since = "1.0.0")]
self.handle.reborrow().into_kv().0
}
+ /// Take ownership of the key and value from the map.
+ #[unstable(feature = "map_entry_recover_keys", issue = "34285")]
+ pub fn remove_pair(self) -> (K, V) {
+ self.remove_kv()
+ }
+
/// Gets a reference to the value in the entry.
#[stable(feature = "rust1", since = "1.0.0")]
pub fn get(&self) -> &V {
self.elem.read().0
}
+ /// Take the ownership of the key and value from the map.
+ #[unstable(feature = "map_entry_recover_keys", issue = "34285")]
+ pub fn remove_pair(self) -> (K, V) {
+ pop_internal(self.elem)
+ }
+
/// Gets a reference to the value in the entry.
#[stable(feature = "rust1", since = "1.0.0")]
pub fn get(&self) -> &V {
pub fn remove(self) -> V {
pop_internal(self.elem).1
}
+
/// Returns a key that was used for search.
///
/// The key was retained for further use.
&self.key
}
+ /// Take ownership of the key.
+ #[unstable(feature = "map_entry_recover_keys", issue = "34285")]
+ pub fn into_key(self) -> K {
+ self.key
+ }
+
/// Sets the value of the entry with the VacantEntry's key,
/// and returns a mutable reference to it
#[stable(feature = "rust1", since = "1.0.0")]