Struct rustc_metadata::rmeta::encoder::EncodeContext
source · [−]pub(super) struct EncodeContext<'a, 'tcx> {
opaque: Encoder,
tcx: TyCtxt<'tcx>,
feat: &'tcx Features,
tables: TableBuilders<'tcx>,
lazy_state: LazyState,
type_shorthands: FxHashMap<Ty<'tcx>, usize>,
predicate_shorthands: FxHashMap<PredicateKind<'tcx>, usize>,
interpret_allocs: FxIndexSet<AllocId>,
source_file_cache: (Lrc<SourceFile>, usize),
required_source_files: Option<GrowableBitSet<usize>>,
is_proc_macro: bool,
hygiene_ctxt: &'a HygieneEncodeContext,
}
Fields
opaque: Encoder
tcx: TyCtxt<'tcx>
feat: &'tcx Features
tables: TableBuilders<'tcx>
lazy_state: LazyState
type_shorthands: FxHashMap<Ty<'tcx>, usize>
predicate_shorthands: FxHashMap<PredicateKind<'tcx>, usize>
interpret_allocs: FxIndexSet<AllocId>
source_file_cache: (Lrc<SourceFile>, usize)
required_source_files: Option<GrowableBitSet<usize>>
is_proc_macro: bool
hygiene_ctxt: &'a HygieneEncodeContext
Implementations
sourceimpl<'a, 'tcx> EncodeContext<'a, 'tcx>
impl<'a, 'tcx> EncodeContext<'a, 'tcx>
fn emit_lazy_distance<T: ?Sized + LazyMeta>(
&mut self,
lazy: Lazy<T>
) -> Result<(), !>
fn lazy<T: ?Sized + LazyMeta>(
&mut self,
value: impl EncodeContentsForLazy<'a, 'tcx, T>
) -> Lazy<T>
fn encode_info_for_items(&mut self)
fn encode_def_path_table(&mut self)
fn encode_def_path_hash_map(&mut self) -> Lazy<DefPathHashMapRef<'tcx>>
fn encode_source_map(&mut self) -> Lazy<[SourceFile]>
fn encode_crate_root(&mut self) -> Lazy<CrateRoot<'tcx>>
sourceimpl<'a, 'tcx> EncodeContext<'a, 'tcx>
impl<'a, 'tcx> EncodeContext<'a, 'tcx>
fn encode_attrs(&mut self, def_id: LocalDefId)
fn encode_def_ids(&mut self)
fn encode_item_type(&mut self, def_id: DefId)
fn encode_enum_variant_info(&mut self, def: AdtDef<'tcx>, index: VariantIdx)
fn encode_enum_variant_ctor(&mut self, def: AdtDef<'tcx>, index: VariantIdx)
fn encode_info_for_mod(&mut self, local_def_id: LocalDefId, md: &Mod<'_>)
fn encode_field(
&mut self,
adt_def: AdtDef<'tcx>,
variant_index: VariantIdx,
field_index: usize
)
fn encode_struct_ctor(&mut self, adt_def: AdtDef<'tcx>, def_id: DefId)
fn encode_explicit_item_bounds(&mut self, def_id: DefId)
fn encode_info_for_trait_item(&mut self, def_id: DefId)
fn encode_info_for_impl_item(&mut self, def_id: DefId)
fn encode_mir(&mut self)
fn encode_stability(&mut self, def_id: DefId)
fn encode_const_stability(&mut self, def_id: DefId)
fn encode_deprecation(&mut self, def_id: DefId)
fn encode_rendered_const_for_body(&mut self, body_id: BodyId) -> String
fn encode_info_for_item(&mut self, def_id: DefId, item: &'tcx Item<'tcx>)
fn encode_info_for_generic_param(
&mut self,
def_id: DefId,
kind: EntryKind,
encode_type: bool
)
fn encode_info_for_closure(&mut self, hir_id: HirId)
fn encode_info_for_anon_const(&mut self, id: HirId)
fn encode_native_libraries(&mut self) -> Lazy<[NativeLib]>
fn encode_foreign_modules(&mut self) -> Lazy<[ForeignModule]>
fn encode_hygiene(
&mut self
) -> (Lazy<Table<u32, Lazy<SyntaxContextData>>>, Lazy<Table<ExpnIndex, Lazy<ExpnData>>>, Lazy<Table<ExpnIndex, Lazy<ExpnHash>>>)
fn encode_proc_macros(&mut self) -> Option<ProcMacroData>
fn encode_debugger_visualizers(&mut self) -> Lazy<[DebuggerVisualizerFile]>
fn encode_crate_deps(&mut self) -> Lazy<[CrateDep]>
fn encode_lib_features(&mut self) -> Lazy<[(Symbol, Option<Symbol>)]>
fn encode_diagnostic_items(&mut self) -> Lazy<[(Symbol, DefIndex)]>
fn encode_lang_items(&mut self) -> Lazy<[(DefIndex, usize)]>
fn encode_lang_items_missing(&mut self) -> Lazy<[LangItem]>
fn encode_traits(&mut self) -> Lazy<[DefIndex]>
sourcefn encode_impls(&mut self) -> Lazy<[TraitImpls]>
fn encode_impls(&mut self) -> Lazy<[TraitImpls]>
Encodes an index, mapping each trait to its (local) implementations.
fn encode_incoherent_impls(&mut self) -> Lazy<[IncoherentImpls]>
fn encode_exported_symbols(
&mut self,
exported_symbols: &[(ExportedSymbol<'tcx>, SymbolExportInfo)]
) -> Lazy<[(ExportedSymbol<'tcx>, SymbolExportInfo)]>
fn encode_dylib_dependency_formats(
&mut self
) -> Lazy<[Option<LinkagePreference>]>
fn encode_info_for_foreign_item(
&mut self,
def_id: DefId,
nitem: &ForeignItem<'_>
)
sourceimpl<'a, 'tcx> EncodeContext<'a, 'tcx>
impl<'a, 'tcx> EncodeContext<'a, 'tcx>
fn encode_fields(&mut self, adt_def: AdtDef<'tcx>)
fn encode_info_for_generics(&mut self, generics: &Generics<'tcx>)
fn encode_info_for_expr(&mut self, expr: &Expr<'_>)
fn encode_ident_span(&mut self, def_id: DefId, ident: Ident)
sourcefn encode_addl_info_for_item(&mut self, item: &Item<'_>)
fn encode_addl_info_for_item(&mut self, item: &Item<'_>)
In some cases, along with the item itself, we also encode some sub-items. Usually we want some info from the item so it’s easier to do that here then to wait until we would encounter normally in the visitor walk.
Trait Implementations
sourceimpl<'tcx, '__a> Encodable<EncodeContext<'__a, 'tcx>> for ProcMacroData
impl<'tcx, '__a> Encodable<EncodeContext<'__a, 'tcx>> for ProcMacroData
sourceimpl<'tcx, '__a> Encodable<EncodeContext<'__a, 'tcx>> for CrateRoot<'tcx>
impl<'tcx, '__a> Encodable<EncodeContext<'__a, 'tcx>> for CrateRoot<'tcx>
sourceimpl<'tcx, '__a> Encodable<EncodeContext<'__a, 'tcx>> for TraitImpls
impl<'tcx, '__a> Encodable<EncodeContext<'__a, 'tcx>> for TraitImpls
sourceimpl<'tcx, '__a> Encodable<EncodeContext<'__a, 'tcx>> for IncoherentImpls
impl<'tcx, '__a> Encodable<EncodeContext<'__a, 'tcx>> for IncoherentImpls
sourceimpl<'tcx, '__a> Encodable<EncodeContext<'__a, 'tcx>> for LazyTables<'tcx>
impl<'tcx, '__a> Encodable<EncodeContext<'__a, 'tcx>> for LazyTables<'tcx>
sourceimpl<'tcx, '__a> Encodable<EncodeContext<'__a, 'tcx>> for EntryKind
impl<'tcx, '__a> Encodable<EncodeContext<'__a, 'tcx>> for EntryKind
sourceimpl<'tcx, '__a> Encodable<EncodeContext<'__a, 'tcx>> for AssocFnData
impl<'tcx, '__a> Encodable<EncodeContext<'__a, 'tcx>> for AssocFnData
sourceimpl<'a, 'tcx> Encodable<EncodeContext<'a, 'tcx>> for DefPathHashMapRef<'tcx>
impl<'a, 'tcx> Encodable<EncodeContext<'a, 'tcx>> for DefPathHashMapRef<'tcx>
fn encode(&self, e: &mut EncodeContext<'a, 'tcx>) -> EncodeResult
sourceimpl<'a, 'tcx, T: Encodable<EncodeContext<'a, 'tcx>>> Encodable<EncodeContext<'a, 'tcx>> for Lazy<T>
impl<'a, 'tcx, T: Encodable<EncodeContext<'a, 'tcx>>> Encodable<EncodeContext<'a, 'tcx>> for Lazy<T>
fn encode(&self, e: &mut EncodeContext<'a, 'tcx>) -> EncodeResult
sourceimpl<'a, 'tcx> Encodable<EncodeContext<'a, 'tcx>> for &'tcx [Node<'tcx>]
impl<'a, 'tcx> Encodable<EncodeContext<'a, 'tcx>> for &'tcx [Node<'tcx>]
fn encode(&self, s: &mut EncodeContext<'a, 'tcx>) -> EncodeResult
sourceimpl<'a, 'tcx> Encodable<EncodeContext<'a, 'tcx>> for &'tcx [(Predicate<'tcx>, Span)]
impl<'a, 'tcx> Encodable<EncodeContext<'a, 'tcx>> for &'tcx [(Predicate<'tcx>, Span)]
fn encode(&self, s: &mut EncodeContext<'a, 'tcx>) -> EncodeResult
sourceimpl<'a, 'tcx, T: Encodable<EncodeContext<'a, 'tcx>>> Encodable<EncodeContext<'a, 'tcx>> for Lazy<[T]>
impl<'a, 'tcx, T: Encodable<EncodeContext<'a, 'tcx>>> Encodable<EncodeContext<'a, 'tcx>> for Lazy<[T]>
fn encode(&self, e: &mut EncodeContext<'a, 'tcx>) -> EncodeResult
sourceimpl<'a, 'tcx, I: Idx, T> Encodable<EncodeContext<'a, 'tcx>> for Lazy<Table<I, T>> where
Option<T>: FixedSizeEncoding,
impl<'a, 'tcx, I: Idx, T> Encodable<EncodeContext<'a, 'tcx>> for Lazy<Table<I, T>> where
Option<T>: FixedSizeEncoding,
fn encode(&self, e: &mut EncodeContext<'a, 'tcx>) -> EncodeResult
sourceimpl<'a, 'tcx> Encodable<EncodeContext<'a, 'tcx>> for CrateNum
impl<'a, 'tcx> Encodable<EncodeContext<'a, 'tcx>> for CrateNum
fn encode(&self, s: &mut EncodeContext<'a, 'tcx>) -> EncodeResult
sourceimpl<'a, 'tcx> Encodable<EncodeContext<'a, 'tcx>> for DefIndex
impl<'a, 'tcx> Encodable<EncodeContext<'a, 'tcx>> for DefIndex
fn encode(&self, s: &mut EncodeContext<'a, 'tcx>) -> EncodeResult
sourceimpl<'a, 'tcx> Encodable<EncodeContext<'a, 'tcx>> for ExpnIndex
impl<'a, 'tcx> Encodable<EncodeContext<'a, 'tcx>> for ExpnIndex
fn encode(&self, s: &mut EncodeContext<'a, 'tcx>) -> EncodeResult
sourceimpl<'a, 'tcx> Encodable<EncodeContext<'a, 'tcx>> for SyntaxContext
impl<'a, 'tcx> Encodable<EncodeContext<'a, 'tcx>> for SyntaxContext
fn encode(&self, s: &mut EncodeContext<'a, 'tcx>) -> EncodeResult
sourceimpl<'a, 'tcx> Encodable<EncodeContext<'a, 'tcx>> for ExpnId
impl<'a, 'tcx> Encodable<EncodeContext<'a, 'tcx>> for ExpnId
fn encode(&self, s: &mut EncodeContext<'a, 'tcx>) -> EncodeResult
sourceimpl<'a, 'tcx> Encodable<EncodeContext<'a, 'tcx>> for Span
impl<'a, 'tcx> Encodable<EncodeContext<'a, 'tcx>> for Span
fn encode(&self, s: &mut EncodeContext<'a, 'tcx>) -> EncodeResult
sourceimpl<'a, 'tcx> Encoder for EncodeContext<'a, 'tcx>
impl<'a, 'tcx> Encoder for EncodeContext<'a, 'tcx>
type Error = !
fn emit_unit(&mut self) -> Result<(), Self::Error>
fn emit_usize(&mut self, value: usize) -> Result<(), Self::Error>
fn emit_u128(&mut self, value: u128) -> Result<(), Self::Error>
fn emit_u64(&mut self, value: u64) -> Result<(), Self::Error>
fn emit_u32(&mut self, value: u32) -> Result<(), Self::Error>
fn emit_u16(&mut self, value: u16) -> Result<(), Self::Error>
fn emit_u8(&mut self, value: u8) -> Result<(), Self::Error>
fn emit_isize(&mut self, value: isize) -> Result<(), Self::Error>
fn emit_i128(&mut self, value: i128) -> Result<(), Self::Error>
fn emit_i64(&mut self, value: i64) -> Result<(), Self::Error>
fn emit_i32(&mut self, value: i32) -> Result<(), Self::Error>
fn emit_i16(&mut self, value: i16) -> Result<(), Self::Error>
fn emit_i8(&mut self, value: i8) -> Result<(), Self::Error>
fn emit_bool(&mut self, value: bool) -> Result<(), Self::Error>
fn emit_f64(&mut self, value: f64) -> Result<(), Self::Error>
fn emit_f32(&mut self, value: f32) -> Result<(), Self::Error>
fn emit_char(&mut self, value: char) -> Result<(), Self::Error>
fn emit_str(&mut self, value: &str) -> Result<(), Self::Error>
fn emit_raw_bytes(&mut self, value: &[u8]) -> Result<(), Self::Error>
fn emit_enum<F>(&mut self, f: F) -> Result<(), Self::Error> where
F: FnOnce(&mut Self) -> Result<(), Self::Error>,
fn emit_enum_variant<F>(
&mut self,
_v_name: &str,
v_id: usize,
_len: usize,
f: F
) -> Result<(), Self::Error> where
F: FnOnce(&mut Self) -> Result<(), Self::Error>,
fn emit_fieldless_enum_variant<const ID: usize>(
&mut self,
_v_name: &str
) -> Result<(), Self::Error>
fn emit_enum_variant_arg<F>(
&mut self,
_first: bool,
f: F
) -> Result<(), Self::Error> where
F: FnOnce(&mut Self) -> Result<(), Self::Error>,
fn emit_struct<F>(&mut self, _no_fields: bool, f: F) -> Result<(), Self::Error> where
F: FnOnce(&mut Self) -> Result<(), Self::Error>,
fn emit_struct_field<F>(
&mut self,
_f_name: &str,
_first: bool,
f: F
) -> Result<(), Self::Error> where
F: FnOnce(&mut Self) -> Result<(), Self::Error>,
fn emit_tuple<F>(&mut self, _len: usize, f: F) -> Result<(), Self::Error> where
F: FnOnce(&mut Self) -> Result<(), Self::Error>,
fn emit_tuple_arg<F>(&mut self, _idx: usize, f: F) -> Result<(), Self::Error> where
F: FnOnce(&mut Self) -> Result<(), Self::Error>,
fn emit_option<F>(&mut self, f: F) -> Result<(), Self::Error> where
F: FnOnce(&mut Self) -> Result<(), Self::Error>,
fn emit_option_none(&mut self) -> Result<(), Self::Error>
fn emit_option_some<F>(&mut self, f: F) -> Result<(), Self::Error> where
F: FnOnce(&mut Self) -> Result<(), Self::Error>,
fn emit_seq<F>(&mut self, len: usize, f: F) -> Result<(), Self::Error> where
F: FnOnce(&mut Self) -> Result<(), Self::Error>,
fn emit_seq_elt<F>(&mut self, _idx: usize, f: F) -> Result<(), Self::Error> where
F: FnOnce(&mut Self) -> Result<(), Self::Error>,
fn emit_map<F>(&mut self, len: usize, f: F) -> Result<(), Self::Error> where
F: FnOnce(&mut Self) -> Result<(), Self::Error>,
fn emit_map_elt_key<F>(&mut self, _idx: usize, f: F) -> Result<(), Self::Error> where
F: FnOnce(&mut Self) -> Result<(), Self::Error>,
fn emit_map_elt_val<F>(&mut self, f: F) -> Result<(), Self::Error> where
F: FnOnce(&mut Self) -> Result<(), Self::Error>,
sourceimpl<'a, 'tcx> TyEncoder<'tcx> for EncodeContext<'a, 'tcx>
impl<'a, 'tcx> TyEncoder<'tcx> for EncodeContext<'a, 'tcx>
const CLEAR_CROSS_CRATE: bool = true
fn position(&self) -> usize
fn type_shorthands(&mut self) -> &mut FxHashMap<Ty<'tcx>, usize>
fn predicate_shorthands(&mut self) -> &mut FxHashMap<PredicateKind<'tcx>, usize>
fn encode_alloc_id(&mut self, alloc_id: &AllocId) -> Result<(), Self::Error>
sourceimpl<'a, 'tcx> Visitor<'tcx> for EncodeContext<'a, 'tcx>
impl<'a, 'tcx> Visitor<'tcx> for EncodeContext<'a, 'tcx>
type NestedFilter = OnlyBodies
type NestedFilter = OnlyBodies
Override this type to control which nested HIR are visited; see
NestedFilter
for details. If you override this type, you
must also override nested_visit_map
. Read more
sourcefn nested_visit_map(&mut self) -> Self::Map
fn nested_visit_map(&mut self) -> Self::Map
If type NestedFilter
is set to visit nested items, this method
must also be overridden to provide a map to retrieve nested items. Read more
fn visit_expr(&mut self, ex: &'tcx Expr<'tcx>)
fn visit_anon_const(&mut self, c: &'tcx AnonConst)
sourcefn visit_item(&mut self, item: &'tcx Item<'tcx>)
fn visit_item(&mut self, item: &'tcx Item<'tcx>)
Visits the top-level item and (optionally) nested items / impl items. See
visit_nested_item
for details. Read more
fn visit_foreign_item(&mut self, ni: &'tcx ForeignItem<'tcx>)
fn visit_generics(&mut self, generics: &'tcx Generics<'tcx>)
type Map = <Self::NestedFilter as NestedFilter<'v>>::Map
sourcefn visit_nested_item(&mut self, id: ItemId)
fn visit_nested_item(&mut self, id: ItemId)
Invoked when a nested item is encountered. By default, when
Self::NestedFilter
is nested_filter::None
, this method does
nothing. You probably don’t want to override this method –
instead, override Self::NestedFilter
or use the “shallow” or
“deep” visit patterns described on
itemlikevisit::ItemLikeVisitor
. The only reason to override
this method is if you want a nested pattern but cannot supply a
Map
; see nested_visit_map
for advice. Read more
sourcefn visit_nested_trait_item(&mut self, id: TraitItemId)
fn visit_nested_trait_item(&mut self, id: TraitItemId)
Like visit_nested_item()
, but for trait items. See
visit_nested_item()
for advice on when to override this
method. Read more
sourcefn visit_nested_impl_item(&mut self, id: ImplItemId)
fn visit_nested_impl_item(&mut self, id: ImplItemId)
Like visit_nested_item()
, but for impl items. See
visit_nested_item()
for advice on when to override this
method. Read more
sourcefn visit_nested_foreign_item(&mut self, id: ForeignItemId)
fn visit_nested_foreign_item(&mut self, id: ForeignItemId)
Like visit_nested_item()
, but for foreign items. See
visit_nested_item()
for advice on when to override this
method. Read more
sourcefn visit_nested_body(&mut self, id: BodyId)
fn visit_nested_body(&mut self, id: BodyId)
Invoked to visit the body of a function, method or closure. Like
visit_nested_item
, does nothing by default unless you override
Self::NestedFilter
. Read more
fn visit_param(&mut self, param: &'v Param<'v>)
fn visit_body(&mut self, b: &'v Body<'v>)
fn visit_id(&mut self, _hir_id: HirId)
fn visit_name(&mut self, _span: Span, _name: Symbol)
fn visit_ident(&mut self, ident: Ident)
fn visit_mod(&mut self, m: &'v Mod<'v>, _s: Span, n: HirId)
fn visit_local(&mut self, l: &'v Local<'v>)
fn visit_block(&mut self, b: &'v Block<'v>)
fn visit_stmt(&mut self, s: &'v Stmt<'v>)
fn visit_arm(&mut self, a: &'v Arm<'v>)
fn visit_pat(&mut self, p: &'v Pat<'v>)
fn visit_array_length(&mut self, len: &'v ArrayLen)
fn visit_let_expr(&mut self, lex: &'v Let<'v>)
fn visit_ty(&mut self, t: &'v Ty<'v>)
fn visit_generic_param(&mut self, p: &'v GenericParam<'v>)
fn visit_const_param_default(&mut self, _param: HirId, ct: &'v AnonConst)
fn visit_where_predicate(&mut self, predicate: &'v WherePredicate<'v>)
fn visit_fn_decl(&mut self, fd: &'v FnDecl<'v>)
fn visit_fn(
&mut self,
fk: FnKind<'v>,
fd: &'v FnDecl<'v>,
b: BodyId,
s: Span,
id: HirId
)
fn visit_use(&mut self, path: &'v Path<'v>, hir_id: HirId)
fn visit_trait_item(&mut self, ti: &'v TraitItem<'v>)
fn visit_trait_item_ref(&mut self, ii: &'v TraitItemRef)
fn visit_impl_item(&mut self, ii: &'v ImplItem<'v>)
fn visit_foreign_item_ref(&mut self, ii: &'v ForeignItemRef)
fn visit_impl_item_ref(&mut self, ii: &'v ImplItemRef)
fn visit_trait_ref(&mut self, t: &'v TraitRef<'v>)
fn visit_param_bound(&mut self, bounds: &'v GenericBound<'v>)
fn visit_poly_trait_ref(
&mut self,
t: &'v PolyTraitRef<'v>,
m: TraitBoundModifier
)
fn visit_variant_data(
&mut self,
s: &'v VariantData<'v>,
Symbol,
&'v Generics<'v>,
_parent_id: HirId,
Span
)
fn visit_field_def(&mut self, s: &'v FieldDef<'v>)
fn visit_enum_def(
&mut self,
enum_definition: &'v EnumDef<'v>,
generics: &'v Generics<'v>,
item_id: HirId,
Span
)
fn visit_variant(
&mut self,
v: &'v Variant<'v>,
g: &'v Generics<'v>,
item_id: HirId
)
fn visit_label(&mut self, label: &'v Label)
fn visit_infer(&mut self, inf: &'v InferArg)
fn visit_generic_arg(&mut self, generic_arg: &'v GenericArg<'v>)
fn visit_lifetime(&mut self, lifetime: &'v Lifetime)
fn visit_qpath(&mut self, qpath: &'v QPath<'v>, id: HirId, span: Span)
fn visit_path(&mut self, path: &'v Path<'v>, _id: HirId)
fn visit_path_segment(
&mut self,
path_span: Span,
path_segment: &'v PathSegment<'v>
)
fn visit_generic_args(
&mut self,
path_span: Span,
generic_args: &'v GenericArgs<'v>
)
fn visit_assoc_type_binding(&mut self, type_binding: &'v TypeBinding<'v>)
fn visit_attribute(&mut self, _id: HirId, _attr: &'v Attribute)
fn visit_associated_item_kind(&mut self, kind: &'v AssocItemKind)
fn visit_defaultness(&mut self, defaultness: &'v Defaultness)
fn visit_inline_asm(&mut self, asm: &'v InlineAsm<'v>, id: HirId)
Auto Trait Implementations
impl<'a, 'tcx> !RefUnwindSafe for EncodeContext<'a, 'tcx>
impl<'a, 'tcx> !Send for EncodeContext<'a, 'tcx>
impl<'a, 'tcx> !Sync for EncodeContext<'a, 'tcx>
impl<'a, 'tcx> Unpin for EncodeContext<'a, 'tcx>
impl<'a, 'tcx> !UnwindSafe for EncodeContext<'a, 'tcx>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<'a, T> Captures<'a> for T where
T: ?Sized,
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 1368 bytes