title: Borrowing the T in a Rc<RefCell<T>>
body: <p>I'm trying to do something like this</p>
  
  <pre><code>use std::cell::{RefCell,Ref,RefMut};
  use std::rc::Rc;
  
  struct Entity;
  
  struct Tile {
      entity: Option&lt;Rc&lt;RefCell&lt;Entity&gt;&gt;&gt;
  }
  
  impl Tile {
      pub fn try_read_entity&lt;'a&gt;(&amp;'a self) -&gt; Option&lt;Ref&lt;'a, Entity&gt;&gt; {
          self.entity.map(|e| e.borrow())
      }
  }
  </code></pre>
  
  <p>I'm getting lifetime related errors and find it difficult to understand what exactly is going wrong, or whether it's even possible to do this. </p>