pub struct IrHeader {
pub version: u16,
pub flags: u16,
pub source_hash: u64,
}Expand description
FMIR file header — the first 16 bytes of every FMIR module (a .ir file).
Layout (little-endian):
[0..4) magic – b"FMIR"
[4..6) version – u16
[6..8) flags – u16 (reserved; MUST be 0 — any non-zero bit is a
hard parse error, so unknown future extensions fail
closed instead of being silently mis-parsed. A new
flag bit therefore requires a coordinated forma-ir
release before the compiler may emit it.)
[8..16) source_hash – u64 (hash of original source; currently written as
0 by the JS compiler and not verified here)Fields§
§version: u16FMIR format version. Always IR_VERSION for a header that parsed.
flags: u16Reserved bit field, validated to be zero (see the layout above).
source_hash: u64Hash of the original source module. Written as 0 by the JS compiler today and not verified here.
Implementations§
Trait Implementations§
impl Copy for IrHeader
impl Eq for IrHeader
impl StructuralPartialEq for IrHeader
Auto Trait Implementations§
impl Freeze for IrHeader
impl RefUnwindSafe for IrHeader
impl Send for IrHeader
impl Sync for IrHeader
impl Unpin for IrHeader
impl UnsafeUnpin for IrHeader
impl UnwindSafe for IrHeader
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