RawRepresentable
extension RawRepresentable
-
Factory method that tries to create a new instance for a
Typethat isRawRepresentableand throws anUnsupportedRawValuewhen theType‘sinit?(rawValue:)returns nil.Throws
whenever theTypedoes not supportvalueas rawValueDeclaration
Swift
static func decode(from value: Self.RawValue) throws -> SelfParameters
valuethe raw value for the new instance
Return Value
a new instance with rawValue
value
View on GitHub
RawRepresentable Extension Reference