What is take() being called on? If I look at the docs, I don’t see take() on RefCell (which I think is what borrow_mut() is returning)
More generally - is there a way on the docs site to see all the methods implemented for a given struct/enum, including those that are due to satisfying the various Traits?
I think the complication your having understanding the code is down to auto dereferencing. When dealing with generics it becomes impossible to have all methods generated staticly. Even tool (rls/racer) that give more dynamic results are still struggling to give every method when auto-completing code.
One reason I continue to use IntelliJ Community Edition (I can’t afford CLion.) even though I have to debug with VSCode is that the IDE shows me the inferred types. In your example, I would write
let foo = f.borrow_mut();
and IntelliJ would show me that foo was of type RefMut<MyType>, where MyType is what you put in the RefCell. Autocomplete shows me methods of MyType if I put a “.” following the (), which tells me about the auto dereferencing.