pub fn insert(&mut self, key: K, v: T) -> &'a T::Ref {
		let ptr = self.0.try_insert(key, v).expect("Key already exists");
		// safe because ref does not live longer than HashMapOwner
		unsafe { &*ptr }
	}
/// Insert key and value to the owner
/// 
/// Else returns a reference to the inserted value
/// without using the current lifetime
///
/// # Panics
/// Panics if key already exists
///
/// ```
/// # use push_while_ref::{HashMapOwner, HashMapChild};
/// let mut map = HashMapOwner::new();
/// let mut map = map.child();
/// let v1 = map.insert("10", Box::new(10));
/// let v2 = map.insert("20", Box::new(20));
/// assert_eq!(*v1, 10);
/// assert_eq!(*v2, 20);
/// ```
Insert key and value to the owner
Else returns a reference to the inserted value
without using the current lifetime
Insert key and value to the owner Else returns a reference to the inserted value without using the current lifetime
pub fn insert(&mut self, key: K, v: T) -> &'a T::Ref {
		let ptr = self.0.try_insert(key, v).expect("Key already exists");
		// safe because ref does not live longer than HashMapOwner
		unsafe { &*ptr }
	}
pub fn insert ( & mut self , key : K , v : T ) -> & ' a T :: Ref { let ptr = self . 0 . try_insert ( key , v ) . expect ( " " ) ; // safe because ref does not live longer than HashMapOwner unsafe { & * ptr } }
Insert key and value to the owner
Else returns a reference to the inserted value
without using the current lifetime
Insert key and value to the owner Else returns a reference to the inserted value without using the current lifetime
&mut self
key
K
v
T
&mut self
key
K
v
T
panics
Panics if key already exists


Panics if key already exists
use push_while_ref::{hashmapowner, hashmapchild};
None