Struct DebugNode

Source
pub struct DebugNode {
Show 17 fields pub id: u64, pub parent: Option<u64>, pub depth: usize, pub children: Vec<u64>, pub widget_name: String, pub key: Option<String>, pub layout_size: DebugSize, pub assigned_slot: Option<DebugRect>, pub absolute_bounds: DebugRect, pub paint_bounds: Option<DebugRect>, pub clip_bounds: Option<DebugRect>, pub size_hint: DebugLayoutSizeHint, pub flex_item: DebugFlexItem, pub layout_debug: Option<DebugLayoutInfo>, pub children_slots: Vec<DebugSlot>, pub warnings: Vec<DebugWarning>, pub has_layout: bool,
}
Expand description

Flattened retained-tree node with layout, clip, style, and warning diagnostics.

Nodes are emitted in pre-order. Child IDs preserve retained child order, and depth is zero for the requested root. Bounds are logical viewport pixels.

§Examples

use ailloli_ui_devtools_core::DebugNode;
fn describe(node: &DebugNode) -> (&str, usize, bool) {
    (&node.widget_name, node.depth, node.has_layout)
}

Fields§

§id: u64

Numeric [ElementId] value.

§parent: Option<u64>

Parent ID, or None for the collected root.

§depth: usize

Edge distance from the collected root.

§children: Vec<u64>

Child IDs in retained order, including children without layout.

§widget_name: String

Widget debug name, or Empty/Component for structural nodes.

§key: Option<String>

String representation of the retained key, if any.

§layout_size: DebugSize

Layout result size in logical pixels, or zero when layout is absent.

§assigned_slot: Option<DebugRect>

Parent-assigned absolute slot; None for roots or unlaid-out parents.

§absolute_bounds: DebugRect

Best available absolute bounds, falling back through layout and ancestor bounds.

§paint_bounds: Option<DebugRect>

Paint bounds translated by the node origin, when layout exists.

§clip_bounds: Option<DebugRect>

Bounding rectangle of the translated clip shape, when present.

§size_hint: DebugLayoutSizeHint

Declarative width and height hints.

§flex_item: DebugFlexItem

Flex-item inputs attached by the parent-facing element.

§layout_debug: Option<DebugLayoutInfo>

Recorded layout-pass diagnostics, when runtime instrumentation retained them.

§children_slots: Vec<DebugSlot>

Parent-local and absolute slots paired with existing child IDs.

§warnings: Vec<DebugWarning>

Warnings attributed to this node, refreshed by compute_warnings.

§has_layout: bool

Whether this retained node currently has a layout result.

Trait Implementations§

Source§

impl Clone for DebugNode

Source§

fn clone(&self) -> DebugNode

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DebugNode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for DebugNode

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for DebugNode

Source§

fn eq(&self, other: &DebugNode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for DebugNode

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for DebugNode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<A> IntoClickAction<A> for A
where A: Clone + 'static,

§

fn into_click_action(self) -> ClickAction<A>

Implements the into_click_action helper used by this module.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> Props for T
where T: Clone + 'static,