pub struct Module {
pub types: Vec<Type>,
pub values: Vec<Value>,
pub value_types: Vec<TypeId>,
pub names: Vec<(ValueId, String)>,
pub metadata: Vec<Metadata>,
pub metadata_at: Vec<usize>,
pub named_metadata: Vec<(String, Vec<MetadataId>)>,
pub named_metadata_at: Vec<usize>,
pub at: usize,
pub functions: Vec<Function>,
}Expand description
A module: its types, values, metadata and function bodies.
Fields§
§types: Vec<Type>The type table.
values: Vec<Value>The module’s values by id (globals, functions, module constants); a function body’s own values continue the
numbering in its Function.
value_types: Vec<TypeId>Each value’s type.
names: Vec<(ValueId, String)>The symbol table: the name of the values that have one.
metadata: Vec<Metadata>The metadata records, by MetadataId.
metadata_at: Vec<usize>The bit of the bitcode each metadata record (by id) starts at, for the locations of reflection errors.
named_metadata: Vec<(String, Vec<MetadataId>)>The named metadata (dx.entryPoints, …): the name and the records it lists.
named_metadata_at: Vec<usize>The bit each named metadata record (by index in named_metadata) starts at.
at: usizeThe bit of the bitcode the module block starts at: where a record the module lacks would be.
functions: Vec<Function>The function bodies, in the order of their definitions.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Module
Auto Trait Implementations§
impl Freeze for Module
impl RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl UnsafeUnpin for Module
impl UnwindSafe for Module
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