Skip to main content

ReactComponentIntel

Struct ReactComponentIntel 

Source
pub struct ReactComponentIntel {
    pub path: PathBuf,
    pub component_name: String,
    pub anchor_line: u32,
    pub anchor_col: u32,
    pub render_sites: u32,
    pub distinct_parents: u32,
    pub prop_count: u16,
    pub hooks: ReactHookSummary,
    pub props: Vec<ReactPropIntel>,
}
Expand description

Per-component render + prop + hook intelligence for one React component. DESCRIPTIVE ambient editor context surfaced by the LSP (a component summary code lens plus per-prop hovers), NOT a finding, IssueKind, severity, or total_issues input. Carried in-process on the #[serde(skip)] AnalysisResults::react_component_intel field (like RenderFanInMetric); never serialized, so bare fallow / audit and the JSON / schema surface are untouched.

Counts are HONEST: test/spec/story/fixture render sites are excluded from render_sites, distinct_parents, and per-prop passed_from_sites, and distinct_parents (not the repeat-inflated render_sites) is the headline, mirroring the render-fan-in metric’s discipline.

Fields§

§path: PathBuf

Absolute path of the file declaring the component.

§component_name: String

The component name.

§anchor_line: u32

1-based line of the component definition (anchors the code lens).

§anchor_col: u32

Column of the component definition (byte-derived).

§render_sites: u32

Total JSX render SITES that resolve to this component (each capitalized / member JSX tag is one site). SECONDARY context: a single parent rendering the child five times is five sites but one distinct parent.

§distinct_parents: u32

Distinct (parent_file, parent_component) keys rendering this component. The HEADLINE blast-radius count (never the repeat-inflated site count).

§prop_count: u16

Number of declared props on this component.

§hooks: ReactHookSummary

Per-kind hook counts.

§props: Vec<ReactPropIntel>

Per-prop usage intelligence (one entry per declared prop).

Trait Implementations§

Source§

impl Clone for ReactComponentIntel

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ReactComponentIntel

Source§

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

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

impl Eq for ReactComponentIntel

Source§

impl PartialEq for ReactComponentIntel

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ReactComponentIntel

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<'a, T> FromIn<'a, T> for T

Source§

fn from_in(t: T, _: &'a Allocator) -> T

Converts to this type from the input type within the given allocator.
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.

Source§

impl<'a, T, U> IntoIn<'a, U> for T
where U: FromIn<'a, T>,

Source§

fn into_in(self, allocator: &'a Allocator) -> U

Converts this type into the (usually inferred) input type within the given allocator.
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.