pub struct WidgetNode {
pub widget: Rc<RefCell<dyn Widget>>,
pub children: Vec<WidgetNode>,
}
Expand description
Node in the widget hierarchy.
A WidgetNode
owns a concrete widget instance and zero or more child nodes.
Events are dispatched depth‑first and drawing occurs in the same order.
This mirrors the behaviour of common retained‑mode UI frameworks.
Fields§
§widget: Rc<RefCell<dyn Widget>>
The widget instance held by this node.
children: Vec<WidgetNode>
Child nodes that make up this widget’s hierarchy.
Implementations§
Source§impl WidgetNode
impl WidgetNode
Auto Trait Implementations§
impl Freeze for WidgetNode
impl !RefUnwindSafe for WidgetNode
impl !Send for WidgetNode
impl !Sync for WidgetNode
impl Unpin for WidgetNode
impl !UnwindSafe for WidgetNode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more