Returning iterator of a Vec in a RefCell
You cannot do this because it would allow you to circumvent runtime checks for uniqueness violations. RefCell provides you a way to “defer” mutability exclusiveness checks to runtime, in exchange allowing mutation of the data it holds inside through shared references. This is done using RAII guards: you can obtain a guard object using a … Read more