Struct farmfe_core::module::Module
source · pub struct Module {Show 18 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,
pub custom: HashMap<String, Box<dyn SerializeCustomModuleMetaData>>,
}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
custom: HashMap<String, Box<dyn SerializeCustomModuleMetaData>>Implementations§
Trait Implementations§
source§impl Archive for Modulewhere
ModuleId: Archive,
ModuleType: Archive,
HashSet<ModuleGroupId>: Archive,
Option<ResourcePotId>: Archive,
Box<ModuleMetaData>: Archive,
bool: Archive,
Vec<Arc<String>>: Archive,
usize: Archive,
Arc<String>: Archive,
Vec<String>: Archive,
u128: Archive,
String: Archive,
HashMap<String, Box<dyn SerializeCustomModuleMetaData>>: Archive,
impl Archive for Modulewhere
ModuleId: Archive,
ModuleType: Archive,
HashSet<ModuleGroupId>: Archive,
Option<ResourcePotId>: Archive,
Box<ModuleMetaData>: Archive,
bool: Archive,
Vec<Arc<String>>: Archive,
usize: Archive,
Arc<String>: Archive,
Vec<String>: Archive,
u128: Archive,
String: Archive,
HashMap<String, Box<dyn SerializeCustomModuleMetaData>>: Archive,
§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>,
HashMap<String, Box<dyn SerializeCustomModuleMetaData>>: Archive,
Archived<HashMap<String, Box<dyn SerializeCustomModuleMetaData>>>: Deserialize<HashMap<String, Box<dyn SerializeCustomModuleMetaData>>, __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>,
HashMap<String, Box<dyn SerializeCustomModuleMetaData>>: Archive,
Archived<HashMap<String, Box<dyn SerializeCustomModuleMetaData>>>: Deserialize<HashMap<String, Box<dyn SerializeCustomModuleMetaData>>, __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>,
HashMap<String, Box<dyn SerializeCustomModuleMetaData>>: 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>,
HashMap<String, Box<dyn SerializeCustomModuleMetaData>>: 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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)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.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> FmtForward for T
impl<T> FmtForward for T
source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moresource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moresource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moresource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T, S> SerializeUnsized<S> for T
impl<T, S> SerializeUnsized<S> for T
source§impl<T> Tap for T
impl<T> Tap for T
source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moresource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moresource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moresource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moresource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moresource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moresource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.