pub fn collect_debug_snapshot<A: 'static>(
tree: &ElementTree<A>,
root: ElementId,
viewport: Rect,
) -> DebugSnapshotExpand description
Collects a subtree with no selected/hovered state at frame index zero.
If root is absent, the returned snapshot has no nodes but still preserves
the requested root ID and viewport.
ยงExamples
use ailloli_ui_core::Rect;
use ailloli_ui_devtools_core::collect_debug_snapshot;
use ailloli_ui_runtime::element::{ElementKind, ElementTree};
let mut tree = ElementTree::<()>::new();
let root = tree.create_element(ElementKind::Empty, None, None);
let snapshot = collect_debug_snapshot(&tree, root, Rect::new(0.0, 0.0, 100.0, 50.0));
assert_eq!(snapshot.root, root.0);