Skip to content

swift_conformsToProtocol(metadata:protocol:)

Azoy edited this page May 6, 2021 · 2 revisions

swift_conformsToProtocol(metadata:protocol:)

Checks whether the type conforms to the given protocol.

public func swift_conformsToProtocol(
  metadata: Metadata,
  protocol: ProtocolDescriptor
) -> WitnessTable? 

Parameters

  • metadata: Type metadata to check conformance of.
  • protocol: The protocol to check to see if the type conforms to.

Returns

A witness table of the conformance if it does conform, or nil if it doesn't conform.

Types
Protocols
Global Variables
Global Functions
Clone this wiki locally