Module abi_stable::type_layout

source ·
Expand description

Types for modeling the layout of a datatype

Re-exports

  • pub use self::construction::_private_MonoTypeLayoutDerive;
  • pub use self::construction::_private_TypeLayoutDerive;
  • pub use self::tagging::Tag;
  • pub use self::tl_enums::MakeTLNonExhaustive;

Modules

  • Helper types for type_layout types.
  • Tag is a dynamically typed data structure used to encode extra properties about a type in its layout constant.

Structs

  • A compressed field accessor,represented as 3 bits inside of a CompTLField.
  • The compressed generic parameters of a type, which can be expanded into a GenericParams by calling expand.
  • A TLField represented as a u64, expadable to a TLField by calling the expand method.
  • The layout of all compressed fields in a type definition, one can access the expanded fields by calling the expand method.
  • A compressed version of TLFunction, which can be expanded into a TLFunction by calling the expand method.
  • The typename and generics of the type this layout is associated to, used for printing types (eg: RVec<u8> ).
  • The generic parameters of a type.
  • The layout of an enum,that might depend on generic parameters.
  • Properties of prefix types (vtables and modules) that depends on generic parameters.
  • An error declaring that the Storage of a nonexhaustive enum is not compatible with the enum.
  • Whether this enum is exhaustive,if it is,it can add variants in minor versions.
  • Information about where a type was declared.
  • Which lifetime is being referenced by a field. Allows lifetimes to be renamed,so long as the “same” lifetime is being referenced.
  • A LifetimeIndex::NONE terminated array of 5 lifetime indices.
  • A pair of LifetimeIndex.
  • Either a LifetimeArray or a range into a slice of LifetimePairs.
  • An iterator over a list of type layouts.
  • An error returned by MonoTLData::expand because the GenericTLData it tried to combine itself with was a different variant.
  • A module path.
  • A few static slices that many types in the type_layout module contain ranges into, requiring this type to be passed as a parameter.
  • The parts of the layout of an enum,that don’t depend on generic parameters.
  • Properties of prefix types (vtables and modules) that don’t change with generic parameters.
  • The data in the type layout that does not depend on generic parameters.
  • This stores multiple TypeLayoutCtor,some inline and some in a borrowed slice.
  • An optional u8 which represents None as u8::max_value()
  • An optional u16 which represents None as u16::max_value()
  • A few static slices that many types in the type_layout module contain ranges into, requiring this type to be passed as a parameter.
  • The start and length of a slice into TLFunctions.
  • Used to convert the arguments passed to the tl_genparams macro to a StartLen.
  • The discriminants of an enum.
  • Every property about an enum specifically.
  • The layout of a field.
  • The layout of all the fields in a type definition.
  • An iterator over all the fields in a type definition.
  • A function pointer in a field.
  • An iterator over a range of TLFunctions.
  • Stores all the supported function qualifiers.
  • A slice of functions from a TLFunctions.
  • All the function pointer types in a type declaration.
  • Properties exclusive to nonexhaustive enums.
  • Properties of prefix types (vtables and modules), combining MonoTLPrefixType and GenericTLPrefixType.
  • The layout of a type, also includes metadata about where the type was defined.
  • An index for a slice of type layouts.
  • 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

  • How the discriminant of an enum is represented.
  • Whether a field is accessible,and how it is accessed.
  • The part of TLData that can change based on generic parameters.
  • Either an array of 3 LifetimeIndexPair,or a slice of LifetimeIndexPair.
  • The parts of TLData that don’t change based on generic parameters.
  • The repr(..) attribute used on a type.
  • The interior of the type definition, describing whether the type is a primitive/enum/struct/union and its contents.
  • A discriminant-only version of TLData.
  • A discriminant of an enum variant.
  • Either a TLField or a TLFunction.
  • Types defined in the compiler

Type Aliases