struct group ; struct user { std::vector<std::shared_ptr> groups; }; struct group { std::optional<std::shared_ptr> leader; }; Rust will not allow this to happen: mutable references to data are only ever available when no other references exist, so the call to push_back on line 6, requiring mutable access, would not compile. struct User { groups: Vec < Arc <Mutex<Group>>>, } struct Group { user: Option < Arc <Mutex<User>>> }