You should return Ref
as RefCell do
fn get_string(&self) -> Ref<i32>{
return self.age.borrow_mut()
}
It should behave more or less like reference except the fact that it implements Drop. It used in RefCell instead of references because it do work to uphold RefCell invariants so while you are using RefCell, you should use it.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…