When you need to do the ol’ switcheroo with some memory mem::replace comes in useful.
take() is handy, read more about this. Sometimes you just have to get your hands dirty and do some lifetimes, just a fact of life, get used to it son. Revise some of these impl types, to understand better how they function with std library collections.
and_then() allows you to map over a value returning an option. Useful for when the type mapping is an option.
It’s important to conceptualise the invariants before you write code to validate assumptions and edge cases.
borrow() and borrow_mut() are important methods when using RefCell.
Drop can be implemented with popping
until no elements are left.