Rc<T> is reference counted shared ownership, for a single thread. Every Rc::clone bumps a counter; every drop decrements it. The value is freed when the count reaches zero.
let config = Rc::new(String::from("timeout=30s"));
let a = Rc::clone(&config); // count: 2
let b = Rc::clone(&config); // count: 3
drop(b); // count: 2
Rc::clone(&x) is idiomatic rather than x.clone(), and the reason is readability: it makes it obvious at the call site that this is a cheap counter bump, not a deep copy of the data.
