Module type_layout

Source
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§

CompFieldAccessor
A compressed field accessor,represented as 3 bits inside of a CompTLField.
CompGenericParams
The compressed generic parameters of a type, which can be expanded into a GenericParams by calling expand.
CompTLField
A TLField represented as a u64, expadable to a TLField by calling the expand method.
CompTLFields
The layout of all compressed fields in a type definition, one can access the expanded fields by calling the expand method.
CompTLFunction
A compressed version of TLFunction, which can be expanded into a TLFunction by calling the expand method.
FmtFullType
The typename and generics of the type this layout is associated to, used for printing types (eg: RVec<u8> ).
GenericParams
The generic parameters of a type.
GenericTLEnum
The layout of an enum,that might depend on generic parameters.
GenericTLPrefixType
Properties of prefix types (vtables and modules) that depends on generic parameters.
IncompatibleWithNonExhaustive
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.
ItemInfo
Information about where a type was declared.
LifetimeIndex
Which lifetime is being referenced by a field. Allows lifetimes to be renamed,so long as the “same” lifetime is being referenced.
LifetimeIndexArray
A LifetimeIndex::NONE terminated array of 5 lifetime indices.
LifetimeIndexPair
A pair of LifetimeIndex.
LifetimeRange
Either a LifetimeArray or a range into a slice of LifetimePairs.
MTLIterator
An iterator over a list of type layouts.
MismatchedTLDataVariant
An error returned by MonoTLData::expand because the GenericTLData it tried to combine itself with was a different variant.
ModPath
A module path.
MonoSharedVars
A few static slices that many types in the type_layout module contain ranges into, requiring this type to be passed as a parameter.
MonoTLEnum
The parts of the layout of an enum,that don’t depend on generic parameters.
MonoTLPrefixType
Properties of prefix types (vtables and modules) that don’t change with generic parameters.
MonoTypeLayout
The data in the type layout that does not depend on generic parameters.
MultipleTypeLayouts
This stores multiple TypeLayoutCtor,some inline and some in a borrowed slice.
OptionU8
An optional u8 which represents None as u8::max_value()
OptionU16
An optional u16 which represents None as u16::max_value()
SharedVars
A few static slices that many types in the type_layout module contain ranges into, requiring this type to be passed as a parameter.
StartLen
The start and length of a slice into TLFunctions.
StartLenConverter
Used to convert the arguments passed to the tl_genparams macro to a StartLen.
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.
TLFieldsIterator
An iterator over all the fields in a type definition.
TLFunction
A function pointer in a field.
TLFunctionIter
An iterator over a range of TLFunctions.
TLFunctionQualifiers
Stores all the supported function qualifiers.
TLFunctionSlice
A slice of functions from a TLFunctions.
TLFunctions
All the function pointer types in a type declaration.
TLNonExhaustive
Properties exclusive to nonexhaustive enums.
TLPrefixType
Properties of prefix types (vtables and modules), combining MonoTLPrefixType and GenericTLPrefixType.
TypeLayout
The layout of a type, also includes metadata about where the type was defined.
TypeLayoutIndex
An index for a slice of type layouts.
TypeLayoutRange
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§

DiscriminantRepr
How the discriminant of an enum is represented.
FieldAccessor
Whether a field is accessible,and how it is accessed.
GenericTLData
The part of TLData that can change based on generic parameters.
LifetimeArrayOrSlice
Either an array of 3 LifetimeIndexPair,or a slice of LifetimeIndexPair.
MonoTLData
The parts of TLData that don’t change based on generic parameters.
ReprAttr
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.
TLDataDiscriminant
A discriminant-only version of TLData.
TLDiscriminant
A discriminant of an enum variant.
TLFieldOrFunction
Either a TLField or a TLFunction.
TLPrimitive
Types defined in the compiler

Type Aliases§

CompTLFieldRepr
The underlying representation of CompTLField.
LifetimeIndexPairRepr
The representation of LifetimeIndexPair.
StartLenRepr
The internal representation of StartLen.