Initializer
init(from:transform:)
Creates a variant collection from a symbol variants data of the same value type using the given transformation closure.
init<SymbolValue>(from documentationDataVariants: DocumentationDataVariants<SymbolValue>, transform: ((DocumentationDataVariantsTrait, SymbolValue)?) -> Value)
Discussion
If there are no variants for the symbol data, the transform closure is called with a nil 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.