Struct farmfe_core::module::Module
source · pub struct Module {Show 17 fields
pub id: ModuleId,
pub module_type: ModuleType,
pub module_groups: HashSet<ModuleGroupId>,
pub resource_pot: Option<ResourcePotId>,
pub meta: Box<ModuleMetaData>,
pub side_effects: bool,
pub source_map_chain: Vec<Arc<String>>,
pub external: bool,
pub immutable: bool,
pub execution_order: usize,
pub size: usize,
pub content: Arc<String>,
pub used_exports: Vec<String>,
pub last_update_timestamp: u128,
pub content_hash: String,
pub package_name: String,
pub package_version: String,
}Expand description
Fields§
§id: ModuleIdthe id of this module, generated from the resolved id.
module_type: ModuleTypethe type of this module, for example ModuleType::Js
module_groups: HashSet<ModuleGroupId>the module groups this module belongs to, used to construct crate::module::module_group::ModuleGroupGraph
resource_pot: Option<ResourcePotId>the resource pot this module belongs to
meta: Box<ModuleMetaData>the meta data of this module custom by plugins
side_effects: boolwhether this module has side_effects
source_map_chain: Vec<Arc<String>>the transformed source map chain of this module
external: boolwhether this module marked as external
immutable: boolwhether this module is immutable, for example, the module is immutable if it is from node_modules. This field will be set according to partialBundling.immutable of the user config, default to the module whose resolved_path contains [“/node_modules/”].
execution_order: usizeExecution order of this module in the module graph updated after the module graph is built
size: usizeSource size of this module
content: Arc<String>Source content after load and transform
used_exports: Vec<String>Used exports of this module. Set by the tree-shake plugin
last_update_timestamp: u128last update timestamp
content_hash: Stringcontent(after load and transform) hash
package_name: Stringpackage name of this module
package_version: Stringpackage version of this module
Implementations§
Trait Implementations§
source§impl Archive for Module
impl Archive for Module
§type Archived = ArchivedModule
type Archived = ArchivedModule
§type Resolver = ModuleResolver
type Resolver = ModuleResolver
source§impl<__D: Fallible + ?Sized> Deserialize<Module, __D> for Archived<Module>where
ModuleId: Archive,
Archived<ModuleId>: Deserialize<ModuleId, __D>,
ModuleType: Archive,
Archived<ModuleType>: Deserialize<ModuleType, __D>,
HashSet<ModuleGroupId>: Archive,
Archived<HashSet<ModuleGroupId>>: Deserialize<HashSet<ModuleGroupId>, __D>,
Option<ResourcePotId>: Archive,
Archived<Option<ResourcePotId>>: Deserialize<Option<ResourcePotId>, __D>,
Box<ModuleMetaData>: Archive,
Archived<Box<ModuleMetaData>>: Deserialize<Box<ModuleMetaData>, __D>,
bool: Archive,
Archived<bool>: Deserialize<bool, __D>,
Vec<Arc<String>>: Archive,
Archived<Vec<Arc<String>>>: Deserialize<Vec<Arc<String>>, __D>,
usize: Archive,
Archived<usize>: Deserialize<usize, __D>,
Arc<String>: Archive,
Archived<Arc<String>>: Deserialize<Arc<String>, __D>,
Vec<String>: Archive,
Archived<Vec<String>>: Deserialize<Vec<String>, __D>,
u128: Archive,
Archived<u128>: Deserialize<u128, __D>,
String: Archive,
Archived<String>: Deserialize<String, __D>,
impl<__D: Fallible + ?Sized> Deserialize<Module, __D> for Archived<Module>where
ModuleId: Archive,
Archived<ModuleId>: Deserialize<ModuleId, __D>,
ModuleType: Archive,
Archived<ModuleType>: Deserialize<ModuleType, __D>,
HashSet<ModuleGroupId>: Archive,
Archived<HashSet<ModuleGroupId>>: Deserialize<HashSet<ModuleGroupId>, __D>,
Option<ResourcePotId>: Archive,
Archived<Option<ResourcePotId>>: Deserialize<Option<ResourcePotId>, __D>,
Box<ModuleMetaData>: Archive,
Archived<Box<ModuleMetaData>>: Deserialize<Box<ModuleMetaData>, __D>,
bool: Archive,
Archived<bool>: Deserialize<bool, __D>,
Vec<Arc<String>>: Archive,
Archived<Vec<Arc<String>>>: Deserialize<Vec<Arc<String>>, __D>,
usize: Archive,
Archived<usize>: Deserialize<usize, __D>,
Arc<String>: Archive,
Archived<Arc<String>>: Deserialize<Arc<String>, __D>,
Vec<String>: Archive,
Archived<Vec<String>>: Deserialize<Vec<String>, __D>,
u128: Archive,
Archived<u128>: Deserialize<u128, __D>,
String: Archive,
Archived<String>: Deserialize<String, __D>,
source§impl<__S: Fallible + ?Sized> Serialize<__S> for Modulewhere
ModuleId: Serialize<__S>,
ModuleType: Serialize<__S>,
HashSet<ModuleGroupId>: Serialize<__S>,
Option<ResourcePotId>: Serialize<__S>,
Box<ModuleMetaData>: Serialize<__S>,
bool: Serialize<__S>,
Vec<Arc<String>>: Serialize<__S>,
usize: Serialize<__S>,
Arc<String>: Serialize<__S>,
Vec<String>: Serialize<__S>,
u128: Serialize<__S>,
String: Serialize<__S>,
impl<__S: Fallible + ?Sized> Serialize<__S> for Modulewhere
ModuleId: Serialize<__S>,
ModuleType: Serialize<__S>,
HashSet<ModuleGroupId>: Serialize<__S>,
Option<ResourcePotId>: Serialize<__S>,
Box<ModuleMetaData>: Serialize<__S>,
bool: Serialize<__S>,
Vec<Arc<String>>: Serialize<__S>,
usize: Serialize<__S>,
Arc<String>: Serialize<__S>,
Vec<String>: Serialize<__S>,
u128: Serialize<__S>,
String: Serialize<__S>,
Auto Trait Implementations§
impl Freeze for Module
impl !RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl !UnwindSafe for Module
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
source§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
Archive, it may be unsized. Read more§type MetadataResolver = ()
type MetadataResolver = ()
source§unsafe fn resolve_metadata(
&self,
_: usize,
_: <T as ArchiveUnsized>::MetadataResolver,
_: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
)
unsafe fn resolve_metadata( &self, _: usize, _: <T as ArchiveUnsized>::MetadataResolver, _: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata )
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
source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.