I have a struct (Foo) with an Optional field, that contains a Refcell to an Rc to another struct (Spam).
When trying to call a mutating method on the Spam struct, I cannot seem to borrow this field at al.
I feel like I’ve totally gone down a weird path here, and am probably too close to the trees to see the forest so to speak. Would appreciate any suggestions to improve this?
The field has to be an Option since it may be None or Some, and it has to be an RC. The RefCell seemed like a good idea to mutate the inner contents. Maybe I’ve got the ordering wrong?
Thank you in advance!