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
typeis 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
tdefined inp.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
offsetis 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
nornilif no such property exists.Declaration
Swift
public subscript(n: String) -> AbstractTypeLayout? { get } -
Returns the offset of the stored property named
nornilif 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
View on GitHub