ExistentialType
public struct ExistentialType : TypeProtocol
extension ExistentialType: CustomStringConvertible
An existential type, optionally bound by traits and constraints on associated types.
-
The interface of an existential type.
See moreDeclaration
Swift
public enum Interface : Hashable, Sendable -
The interface of this type’s instances.
Declaration
Swift
public let interface: Interface -
The constraints on the associated types of the witness.
Note
This set shall only contain equality and conformance constraints.Declaration
Swift
public let constraints: Set<GenericConstraint> -
Declaration
Swift
public let flags: ValueFlags -
Creates a new existential type bound by the given interface and constraints.
Declaration
Swift
public init(_ interface: Interface, constraints: Set<GenericConstraint>) -
Creates a new existential type bound by the given traits and constraints.
Declaration
Swift
public init(traits: Set<TraitType>, constraints: Set<GenericConstraint>) -
Creates a new existential type bound by an unparameterized generic type and constraints.
Declaration
Swift
public init(unparameterized t: AnyType, constraints: Set<GenericConstraint>) -
Declaration
Swift
public var description: String { get }
View on GitHub