/// Interns a value returning a counted reference to the
/// value or a pre-existing reference if one can be found
Interns a value returning a counted reference to the
value or a pre-existing reference if one can be found
Interns a value returning a counted reference to the value or a pre - existing reference if one can be found
pub fn intern(&mut self, value: T) -> Rc<T> {
    if let Some(intern) = self.pool.get(&value) {
      intern.clone()
    } else {
      let intern = Rc::new(value);
      self.pool.insert(intern.clone());
      intern
    }
  }
pub fn intern ( & mut self , value : T ) -> Rc < T > { if let Some ( intern ) = self . pool . get ( & value ) { intern . clone ( ) } else { let intern = Rc :: new ( value ) ; self . pool . insert ( intern . clone ( ) ) ; intern } }
Interns a value returning a counted reference to the
value or a pre-existing reference if one can be found
Interns a value returning a counted reference to the value or a pre - existing reference if one can be found
&mut self
value
T