Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRustRc and ArcSingle-choice MCQ

What is the purpose of `Rc::downgrade` and the resulting `Weak<T>` in a parent/child graph?

use std::rc::{Rc, Weak}; struct Node { parent: Weak<Node>, children: Vec<Rc<Node>>, }