AbstractTypeLayout

public struct AbstractTypeLayout : Sendable
extension AbstractTypeLayout: Hashable

The abstract layout of a type, describing the relative offsets of its stored properties.

  • The name and type of a stored property.

    Declaration

    Swift

    public typealias StoredProperty = (name: String?, type: AnyType)
  • The program in which type is defined.

    Declaration

    Swift

    private let program: TypedProgram
  • The type of which this instance is the abstract layout.

    Declaration

    Swift

    public let type: AnyType
  • The stored properties in type, in the order in which they are laid out.

    Declaration

    Swift

    public let properties: [TupleType.Element]
  • Creates the abstract layout of t defined in p.

    Declaration

    Swift

    public init<T>(of t: T, definedIn p: TypedProgram) where T : TypeProtocol
  • Accesses the layout of the stored property at given offset.

    Requires

    offset is a valid offset in this instance.

    Declaration

    Swift

    public subscript(offset: Int) -> AbstractTypeLayout { get }
  • Accesses the layout of the stored property at given offsets.

    Declaration

    Swift

    public subscript<S>(offsets: S) -> AbstractTypeLayout where S : Sequence, S.Element == Int { get }
  • Accesses the layout of the stored property named n or nil if no such property exists.

    Declaration

    Swift

    public subscript(n: String) -> AbstractTypeLayout? { get }
  • Returns the offset of the stored property named n or nil if no such property exists.

    Declaration

    Swift

    public func offset(of n: String) -> Int?
  • Declaration

    Swift

    public func hash(into hasher: inout Hasher)
  • Declaration

    Swift

    public static func == (l: `Self`, r: `Self`) -> Bool