Structure
VariantCollection
A collection of variants for a render node value.
struct VariantCollection<Value> where Value : Decodable, Value : Encodable
Variant collections encapsulate different values for the same piece of content. Each variant collection has a default value and optionally, trait-specific (e.g., programming languageāspecific) values that client can choose to use based on their context.
For example, a collection can a hold programming language-agnostic documentation value as its defaultValue, and hold Objective-C specific values in its variants array. Clients that want to process the Objective-C version of a documentation page then use the override rather than the default value, and fall back to the default value if no Objective-C-specific override is specified.