Skip to main content

ResolvedModule

Struct ResolvedModule 

Source
pub struct ResolvedModule {
Show 19 fields pub file_id: FileId, pub path: PathBuf, pub exports: Arc<[ExportInfo]>, pub re_exports: Vec<ResolvedReExport>, pub resolved_imports: Vec<ResolvedImport>, pub resolved_dynamic_imports: Vec<ResolvedImport>, pub resolved_dynamic_patterns: Vec<(DynamicImportPattern, Vec<FileId>)>, pub member_accesses: Arc<[MemberAccess]>, pub semantic_facts: Arc<[SemanticFact]>, pub whole_object_uses: Arc<[String]>, pub has_cjs_exports: bool, pub has_angular_component_template_url: bool, pub unused_import_bindings: HashSet<String, FxBuildHasher>, pub type_referenced_import_bindings: Vec<String>, pub value_referenced_import_bindings: Vec<String>, pub namespace_object_aliases: Vec<NamespaceObjectAlias>, pub exported_factory_returns: Arc<[FactoryReturnExport]>, pub exported_factory_return_object_shapes: Arc<[FactoryReturnObjectShapeExport]>, pub type_member_types: Arc<[TypeMemberTypeEntry]>,
}
Expand description

Fully resolved module with all imports mapped to targets.

The Arc<[T]> fields are refcounted views of the same allocations owned by the source fallow_types::extract::ModuleInfo, not copies; see the note on that struct.

Fields§

§file_id: FileId

Unique file identifier.

§path: PathBuf

Absolute path to the module file.

§exports: Arc<[ExportInfo]>

All export declarations in this module.

§re_exports: Vec<ResolvedReExport>

All re-exports with resolved targets.

§resolved_imports: Vec<ResolvedImport>

All static imports with resolved targets.

§resolved_dynamic_imports: Vec<ResolvedImport>

All dynamic imports with resolved targets.

§resolved_dynamic_patterns: Vec<(DynamicImportPattern, Vec<FileId>)>

Dynamic import patterns and their matched target files.

§member_accesses: Arc<[MemberAccess]>

Static member accesses (e.g., Status.Active).

§semantic_facts: Arc<[SemanticFact]>

Typed semantic facts produced by extraction for cross-layer analysis.

§whole_object_uses: Arc<[String]>

Identifiers used as whole objects (Object.values, for..in, spread, etc.).

§has_cjs_exports: bool

Whether this module uses CommonJS exports.

§has_angular_component_template_url: bool

Whether this module declares at least one Angular @Component({ templateUrl: ... }) decorator. Mirrors ModuleInfo.has_angular_component_template_url; see that field for the contract this gate enforces.

§unused_import_bindings: HashSet<String, FxBuildHasher>

Local names of import bindings that are never referenced in this file.

§type_referenced_import_bindings: Vec<String>

Local import bindings referenced from type positions.

§value_referenced_import_bindings: Vec<String>

Local import bindings referenced from runtime/value positions.

§namespace_object_aliases: Vec<NamespaceObjectAlias>

Namespace-import aliases re-exported through an object literal. See fallow_types::extract::NamespaceObjectAlias for the shape.

§exported_factory_returns: Arc<[FactoryReturnExport]>

Exported free-function factories that provably return one class instance. See fallow_types::extract::FactoryReturnExport and issue #1441 (Part A).

§exported_factory_return_object_shapes: Arc<[FactoryReturnObjectShapeExport]>

Object-literal factory-return shapes (export function createUi() { return { orders: factory.ordersPage } }), threaded from ModuleInfo for the analyze-layer member-crediting join. See issue #1858.

§type_member_types: Arc<[TypeMemberTypeEntry]>

Named-type property types declared by this module’s top-level interfaces and type-literal aliases. See fallow_types::extract::TypeMemberTypeEntry and issue #1785.

Implementations§

Source§

impl ResolvedModule

Source

pub fn all_resolved_imports(&self) -> impl Iterator<Item = &ResolvedImport>

Iterate over all concrete resolved imports in source order buckets.

Includes static import/require edges and literal dynamic import() edges. Dynamic import patterns are intentionally excluded because they resolve to sets of files rather than single import specifiers.

Source

pub fn all_resolved_source_edges( &self, ) -> impl Iterator<Item = ResolvedSourceEdge<'_>>

Iterate over every literal source edge that has one resolved target.

Includes static imports, literal dynamic imports, and re-export sources. Dynamic import patterns are excluded because they resolve to sets of files rather than single import specifiers.

Trait Implementations§

Source§

impl Debug for ResolvedModule

Source§

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

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

impl Default for ResolvedModule

Source§

fn default() -> ResolvedModule

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> 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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more