Expand description
Types for modeling the layout of a datatype
Re-exports§
pub use self::tagging::Tag;
Modules§
- data_
structures - Helper types for type_layout types.
- tagging
- Tag is a dynamically typed data structure used to encode extra properties about a type in its layout constant.
Structs§
- Comp
Field Accessor - A compressed field accessor,represented as 3 bits inside of a CompTLField.
- Comp
Generic Params - The compressed generic parameters of a type,
which can be expanded into a
GenericParams
by callingexpand
. - CompTL
Field - A
TLField
represented as au64
, expadable to aTLField
by calling theexpand
method. - CompTL
Fields - The layout of all compressed fields in a type definition, one can access the expanded fields by calling the expand method.
- CompTL
Function - A compressed version of
TLFunction
, which can be expanded into aTLFunction
by calling theexpand
method. - FmtFull
Type - The typename and generics of the type this layout is associated to,
used for printing types (eg:
RVec<u8>
). - Generic
Params - The generic parameters of a type.
- GenericTL
Enum - The layout of an enum,that might depend on generic parameters.
- GenericTL
Prefix Type - Properties of prefix types (vtables and modules) that depends on generic parameters.
- Incompatible
With NonExhaustive - An error declaring that the Storage of a nonexhaustive enum is not compatible with the enum.
- IsExhaustive
- Whether this enum is exhaustive,if it is,it can add variants in minor versions.
- Item
Info - Information about where a type was declared.
- Lifetime
Index - Which lifetime is being referenced by a field. Allows lifetimes to be renamed,so long as the “same” lifetime is being referenced.
- Lifetime
Index Array - A
LifetimeIndex::NONE
terminated array of 5 lifetime indices. - Lifetime
Index Pair - A pair of
LifetimeIndex
. - Lifetime
Range - Either a
LifetimeArray
or a range into a slice ofLifetimePair
s. - MTLIterator
- An iterator over a list of type layouts.
- MismatchedTL
Data Variant - An error returned by
MonoTLData::expand
because theGenericTLData
it tried to combine itself with was a different variant. - ModPath
- A module path.
- Mono
Shared Vars - A few static slices that many types in the
type_layout
module contain ranges into, requiring this type to be passed as a parameter. - MonoTL
Enum - The parts of the layout of an enum,that don’t depend on generic parameters.
- MonoTL
Prefix Type - Properties of prefix types (vtables and modules) that don’t change with generic parameters.
- Mono
Type Layout - The data in the type layout that does not depend on generic parameters.
- Multiple
Type Layouts - This stores multiple
TypeLayoutCtor
,some inline and some in a borrowed slice. - Option
U8 - An optional u8 which represents None as
u8::max_value()
- Option
U16 - An optional u16 which represents None as
u16::max_value()
- Shared
Vars - A few static slices that many types in the
type_layout
module contain ranges into, requiring this type to be passed as a parameter. - Start
Len - The start and length of a slice into
TLFunctions
. - Start
LenConverter - Used to convert the arguments passed to the
tl_genparams
macro to aStartLen
. - TLDiscriminants
- The discriminants of an enum.
- TLEnum
- Every property about an enum specifically.
- TLField
- The layout of a field.
- TLFields
- The layout of all the fields in a type definition.
- TLFields
Iterator - An iterator over all the fields in a type definition.
- TLFunction
- A function pointer in a field.
- TLFunction
Iter - An iterator over a range of
TLFunction
s. - TLFunction
Qualifiers - Stores all the supported function qualifiers.
- TLFunction
Slice - A slice of functions from a
TLFunctions
. - TLFunctions
- All the function pointer types in a type declaration.
- TLNon
Exhaustive - Properties exclusive to nonexhaustive enums.
- TLPrefix
Type - Properties of prefix types (vtables and modules),
combining
MonoTLPrefixType
andGenericTLPrefixType
. - Type
Layout - The layout of a type, also includes metadata about where the type was defined.
- Type
Layout Index - An index for a slice of type layouts.
- Type
Layout Range - A range of indices into a slice of type layouts which can store up to five indices inline, requiring additional layouts to be stored contiguously after the fourth one in the slice.
Enums§
- Discriminant
Repr - How the discriminant of an enum is represented.
- Field
Accessor - Whether a field is accessible,and how it is accessed.
- GenericTL
Data - The part of TLData that can change based on generic parameters.
- Lifetime
Array OrSlice - Either an array of 3
LifetimeIndexPair
,or a slice ofLifetimeIndexPair
. - MonoTL
Data - The parts of TLData that don’t change based on generic parameters.
- Repr
Attr - The
repr(..)
attribute used on a type. - TLData
- The interior of the type definition, describing whether the type is a primitive/enum/struct/union and its contents.
- TLData
Discriminant - A discriminant-only version of TLData.
- TLDiscriminant
- A discriminant of an enum variant.
- TLField
OrFunction - Either a TLField or a TLFunction.
- TLPrimitive
- Types defined in the compiler
Type Aliases§
- CompTL
Field Repr - The underlying representation of
CompTLField
. - Lifetime
Index Pair Repr - The representation of
LifetimeIndexPair
. - Start
LenRepr - The internal representation of
StartLen
.