Skip to content

swift_getExistentialTypeMetadata(________)

0x41c edited this page Feb 28, 2022 · 1 revision

swift_getExistentialTypeMetadata(_:_:_:_:)

Fetch a uniqued metadata for an existential type.

@_silgen_name("swift_getExistentialTypeMetadata")
public func swift_getExistentialTypeMetadata(
    _ classConstraint: UnsafeRawPointer,
    _ superClassConstraint: Any.Type?,
    _ protocolCount: Int,
    _ protocols: UnsafeRawBufferPointer
) -> Any.Type

The array referenced by protocols will be sorted in-place.

Parameters

  • classConstraint: Defines whether the type is a class or not.
  • superClassConstraint: The type of the super class if any.
  • protocolCount: The amount of protocols the type conforms to.
  • protocols: A buffer pointer containing the protocol references.

Returns

AnyObject or Any if there is no superclass and no protocols. Otherwise, it will return a type from a lookup table with all the parameters used as a key.

Types
Protocols
Global Typealiases
Global Functions
Clone this wiki locally