in Sources/SwiftDocC/Infrastructure/DocumentationContext.swift [1344:1370]
func buildRelationships(_ relationships: Set<SymbolGraph.Relationship>, bundle: DocumentationBundle, engine: DiagnosticEngine) {
for edge in relationships {
// Build conformant type <-> protocol relationships
if case .conformsTo = edge.kind {
SymbolGraphRelationshipsBuilder.addConformanceRelationship(edge: edge, in: bundle, symbolIndex: &symbolIndex, engine: diagnosticEngine)
continue
}
// Build implementation <-> protocol requirement relationships.
if case .defaultImplementationOf = edge.kind {
SymbolGraphRelationshipsBuilder.addImplementationRelationship(edge: edge, in: bundle, context: self, symbolIndex: &symbolIndex, engine: diagnosticEngine)
continue
}
// Build ancestor <-> offspring relationships.
if case .inheritsFrom = edge.kind {
SymbolGraphRelationshipsBuilder.addInheritanceRelationship(edge: edge, in: bundle, symbolIndex: &symbolIndex, engine: diagnosticEngine)
continue
}
// Build required member -> protocol relationships.
if case .requirementOf = edge.kind {
SymbolGraphRelationshipsBuilder.addRequirementRelationship(edge: edge, in: bundle, symbolIndex: &symbolIndex, engine: diagnosticEngine)
continue
}
}
}