Metatype
public struct Metatype
extension Metatype: Equatable
extension Metatype: Hashable
A wrapper around the metatype of any type.
This wrapper allows a metatype (T.Type, String.self, etc.) to conform to Equatable and
Hashable. Therefore, a metatype can be used as a key in a dictionary.
-
Creates a
Metatypewith the givenbasemetatype to wrap.Declaration
Swift
@inlinable public init(_ base: Any.Type)
-
Declaration
Swift
@inlinable public static func == (lhs: Metatype, rhs: Metatype) -> BoolReturn Value
trueif the given metatypes wrapped up by the givenMetatypevalues are equivalent. Otherwise,false.
-
Declaration
Swift
@inlinable public func hash(into hasher: inout Hasher)Return Value
A unique hash value for the metatype wrapped-up herein.
View on GitHub
Install in Dash
Metatype Structure Reference