pub struct Module<'a> {Show 17 fields
pub assets: Vec<Value>,
pub built: bool,
pub cacheable: bool,
pub chunks: Vec<ChunkId>,
pub error_count: u32,
pub warning_count: u32,
pub failed: bool,
pub id: Option<ModuleId>,
pub identifier: ModuleIdentifier,
pub name: ModuleName,
pub optional: bool,
pub prefetched: bool,
pub reasons: Reasons<'a>,
pub size: SizeBytes,
pub source: Option<SourceText<'a>>,
pub profile: Profile,
pub modules: Modules<'a>,
}
Fields§
§assets: Vec<Value>
§built: bool
Indicates that the module went through loaders, Parsing, and Code Generation
cacheable: bool
§chunks: Vec<ChunkId>
§error_count: u32
§warning_count: u32
§failed: bool
§id: Option<ModuleId>
Possibly a relic of the past? Also undocumented by webpack. ModuleIdentifier / identifier is a better unique name. Use that if possible.
identifier: ModuleIdentifier
§name: ModuleName
§optional: bool
§prefetched: bool
§reasons: Reasons<'a>
Every module also contains a list of reasons objects describing why that module was included in the dependency graph. Each “reason” is similar to the origins
size: SizeBytes
§source: Option<SourceText<'a>>
§profile: Profile
§modules: Modules<'a>
Trait Implementations§
Source§impl<'de: 'a, 'a> Deserialize<'de> for Module<'a>
impl<'de: 'a, 'a> Deserialize<'de> for Module<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> Edges<ModuleIdentifier, (ImportType, ResolvedModule)> for Module<'a>
impl<'a> Edges<ModuleIdentifier, (ImportType, ResolvedModule)> for Module<'a>
fn next_edge( &self, previous_edge_index: Option<usize>, ) -> Option<Edge<ModuleIdentifier, (ImportType, ResolvedModule)>>
fn edges(&self) -> EdgeIterator<'_, I, D, Self>where
Self: Sized,
Source§impl<'a> ExtractData<HashSet<ChunkId>> for Module<'a>
impl<'a> ExtractData<HashSet<ChunkId>> for Module<'a>
fn extract_data(&self) -> ModuleChunks
Source§impl<'a> ExtractData<IncludedModuleNames> for Module<'a>
impl<'a> ExtractData<IncludedModuleNames> for Module<'a>
fn extract_data(&self) -> IncludedModuleNames
Source§impl<'a> Identifiable<ModuleIdentifier> for Module<'a>
impl<'a> Identifiable<ModuleIdentifier> for Module<'a>
fn get_id(&self) -> ModuleIdentifier
Source§impl<'a> Query<ModuleIdentifier, Module<'a>> for Modules<'a>
impl<'a> Query<ModuleIdentifier, Module<'a>> for Modules<'a>
fn query(&self, _identifier: &ModuleIdentifier) -> Option<&Module<'a>>
fn all(&self) -> Vec<&Module<'a>>
fn create_index( &self, ) -> HashMap<ModuleIdentifier, Link<'_, ModuleIdentifier, Module<'a>>>
impl<'a> Module for Module<'a>
impl<'a> Modules<Module<'a>> for Modules<'a>
Auto Trait Implementations§
impl<'a> Freeze for Module<'a>
impl<'a> RefUnwindSafe for Module<'a>
impl<'a> !Send for Module<'a>
impl<'a> !Sync for Module<'a>
impl<'a> Unpin for Module<'a>
impl<'a> UnwindSafe for Module<'a>
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