enum OptionalIndex [src]
Fields
main_struct_inst = 0ZIR is structured so that the outermost "main" struct of any file
is always at index 0.
ref_start_index = Index.static_len
none = std.math.maxInt(u32)
_
Members
- unwrap (Function)
Source
pub const OptionalIndex = enum(u32) {
/// ZIR is structured so that the outermost "main" struct of any file
/// is always at index 0.
main_struct_inst = 0,
ref_start_index = Index.static_len,
none = std.math.maxInt(u32),
_,
pub fn unwrap(oi: OptionalIndex) ?Index {
return if (oi == .none) null else @enumFromInt(@intFromEnum(oi));
}
}