pub struct InspectNode {
pub id: WidgetId,
pub parent: Option<WidgetId>,
pub type_name: &'static str,
pub debug_label: Option<Cow<'static, str>>,
pub bounds: Rect,
pub children: Vec<WidgetId>,
pub depth: usize,
}Expand description
One node of a read-only widget-tree snapshot, from WidgetTree::inspect.
Plain owned data with no borrow of the tree; geometry is kurbo and any wire
format belongs to the consumer.
Fields§
§id: WidgetIdThe node’s stable WidgetId.
parent: Option<WidgetId>The parent’s id, or None for a root.
type_name: &'static strThe concrete widget type’s name — see WidgetPod::type_name.
debug_label: Option<Cow<'static, str>>The pod’s optional debug label — see WidgetPod::set_debug_label.
bounds: RectThe border box in absolute window coordinates (logical px), accumulated from the root; zero-sized until a layout pass has run.
children: Vec<WidgetId>This node’s children: arena children first, then the widget’s owned ChildPods.
depth: usizeDistance from the root (roots are 0).
Trait Implementations§
Source§impl Clone for InspectNode
impl Clone for InspectNode
Source§impl Debug for InspectNode
impl Debug for InspectNode
Source§impl PartialEq for InspectNode
impl PartialEq for InspectNode
impl StructuralPartialEq for InspectNode
Auto Trait Implementations§
impl Freeze for InspectNode
impl RefUnwindSafe for InspectNode
impl Send for InspectNode
impl Sync for InspectNode
impl Unpin for InspectNode
impl UnsafeUnpin for InspectNode
impl UnwindSafe for InspectNode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.