Skip to main content

RenderFanInMetric

Struct RenderFanInMetric 

Source
pub struct RenderFanInMetric {
    pub per_component: Vec<RenderFanInComponent>,
    pub p95_distinct_parents: Option<u32>,
    pub high_pct: Option<f64>,
    pub max_distinct_parents: Option<u32>,
}
Expand description

Per-component render fan-in counts plus the precomputed concentration aggregates.

DESCRIPTIVE blast-radius signal (NOT a rule, finding, or threshold): the component-graph analogue of module-level fan-in. Module fan-in counts importing MODULES; render fan-in counts JSX render CALL SITES (a shared <Button> is rendered in far more places than it is imported).

per_component is the internal carrier (keyed for hotspot path annotation), #[serde(skip)] on AnalysisResults so it never appears under bare fallow / audit; the aggregates feed the descriptive VitalSigns block (p95_render_fan_in / render_fan_in_high_pct / max_render_fan_in).

UNDERCOUNT is the documented safe direction: a child rendered via a JSX spread, a dynamic / createElement(var) form, or a member-expression tag (<Lib.Button/>) is not resolved by the shared ChildResolver and so increments no component’s fan-in. A true high-fan-in component can only be undersold, never falsely flagged. A rare name-collision over-credit is possible via the default-import sole-component fallback (inherited verbatim from the prop-drilling / thin-wrapper resolver); low-harm for a descriptive, non-gating metric.

Fields§

§per_component: Vec<RenderFanInComponent>

Per-component render-site + distinct-parent counts. Keyed by (component file path, component name) so the hotspot surface can map a file back to its top component’s fan-in. Components rendered nowhere ARE included as a real 0 so the percentile distribution is not skewed.

§p95_distinct_parents: Option<u32>

95th-percentile DISTINCT-PARENTS render fan-in across components (the per-component distribution analogue of the module-fan-in p95). None on an empty population. Mirrors compute_coupling_concentration.

§high_pct: Option<f64>

Percentage of components whose distinct-parents render fan-in exceeds the max(p95, 10) threshold (the same floor coupling concentration uses). None on an empty population.

§max_distinct_parents: Option<u32>

The single highest DISTINCT-PARENTS count across all components (the headline blast-radius number: the most distinct render LOCATIONS any one component is rendered from, the honest edit-ripple count). None on an empty population. render_sites (incl. repeats) is secondary per-component context, never the headline.

Trait Implementations§

Source§

impl Clone for RenderFanInMetric

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 RenderFanInMetric

Source§

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

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

impl Default for RenderFanInMetric

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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<'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.