pub struct ComponentOrigin {
pub component_id: AzString,
pub data_model_json: Json,
}Expand description
Tracks which component rendered a DOM subtree.
When a component’s render_fn returns a StyledDom, the framework stamps the
root node(s) of the output with a ComponentOrigin. This enables:
- The debugger to show a “Component Tree” alongside the DOM tree
- Code generation roundtrips (rendered DOM → component invocations → code)
- Clicking a DOM node to navigate to the component that produced it
Fields§
§component_id: AzStringQualified component name, e.g. “shadcn:card”, “builtin:div”
data_model_json: JsonSnapshot of the data model at render time, stored as a JSON value. The debug server can inspect typed values; the frontend serializes them back to JSON for display and editing.
Trait Implementations§
Source§impl Clone for ComponentOrigin
impl Clone for ComponentOrigin
Source§fn clone(&self) -> ComponentOrigin
fn clone(&self) -> ComponentOrigin
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ComponentOrigin
impl Debug for ComponentOrigin
Source§impl Default for ComponentOrigin
impl Default for ComponentOrigin
Source§impl Hash for ComponentOrigin
impl Hash for ComponentOrigin
Source§impl Ord for ComponentOrigin
impl Ord for ComponentOrigin
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ComponentOrigin
impl PartialEq for ComponentOrigin
Source§fn eq(&self, other: &ComponentOrigin) -> bool
fn eq(&self, other: &ComponentOrigin) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ComponentOrigin
impl PartialOrd for ComponentOrigin
impl Eq for ComponentOrigin
impl StructuralPartialEq for ComponentOrigin
Auto Trait Implementations§
impl Freeze for ComponentOrigin
impl RefUnwindSafe for ComponentOrigin
impl Send for ComponentOrigin
impl Sync for ComponentOrigin
impl Unpin for ComponentOrigin
impl UnsafeUnpin for ComponentOrigin
impl UnwindSafe for ComponentOrigin
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