pub struct ModuleChunk {
pub name: String,
pub main: bool,
pub file: String,
pub constants: Vec<Value>,
pub identifiers: Vec<String>,
pub functions: Vec<FunctionChunk>,
pub classes: Vec<ClassChunk>,
pub has_init: bool,
}
Expand description
Compile time repr of an imported module, but without the scanner, instead with the file name
Fields§
§name: String
The name of the module
main: bool
Whether or not this is the main module
file: String
The file name of the module
constants: Vec<Value>
§identifiers: Vec<String>
§functions: Vec<FunctionChunk>
§classes: Vec<ClassChunk>
§has_init: bool
Implementations§
Source§impl ModuleChunk
impl ModuleChunk
pub fn new(main: bool, name: String, file: String) -> ModuleChunk
pub fn from(module: CompilerModuleChunk) -> ModuleChunk
Trait Implementations§
Source§impl Clone for ModuleChunk
impl Clone for ModuleChunk
Source§fn clone(&self) -> ModuleChunk
fn clone(&self) -> ModuleChunk
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ModuleChunk
impl Debug for ModuleChunk
Source§impl<'de> Deserialize<'de> for ModuleChunk
impl<'de> Deserialize<'de> for ModuleChunk
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 PartialEq for ModuleChunk
impl PartialEq for ModuleChunk
Source§impl Serialize for ModuleChunk
impl Serialize for ModuleChunk
impl StructuralPartialEq for ModuleChunk
Auto Trait Implementations§
impl Freeze for ModuleChunk
impl RefUnwindSafe for ModuleChunk
impl Send for ModuleChunk
impl Sync for ModuleChunk
impl Unpin for ModuleChunk
impl UnwindSafe for ModuleChunk
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