Include wrapper type when calling rust methods
Sometimes, when calling methods on a struct inside a box or rc, you want the wrapper object. The way to do it is to use `self: &Box<T>` notation in parameter. Here's an example.
use std::rc::Rc;
struct Node;
impl Node {
fn test_rc(self: &Rc<Node>) {
println!("test rc!");
}
fn test_box(self: &Box<Node>) {
println!("test box!");
}
}
fn main() {
let n = Rc::new(Node);
n.test_rc();
let n = Box::new(Node);
n.test_box();
}