Initializer
init(from:optionalValue:transform:)
Creates a variant collection of optional value from two symbol variants data using the given transformation closure.
init?<Value1, Value2, Wrapped>(from documentationDataVariants1: DocumentationDataVariants<Value1>, optionalValue documentationDataVariants2: DocumentationDataVariants<Value2>, transform: (DocumentationDataVariantsTrait, Value1, Value2?) -> Value) where Value == Wrapped?, Wrapped : Decodable, Wrapped : Encodable
Discussion
If the first symbol data variants value is empty, this initializer returns nil. If the second data variants value is empty, the transform closure is passed nil for the second value.
This initializer picks a variant (the Swift variant, if available) of the given symbol data as the default value for the variant collection. Other variants are encoded in the variant collection’s variants.