func decodeMetadataItemForKey()

in Sources/SymbolKit/SymbolGraph/Symbol/Symbol.swift [183:206]


        func decodeMetadataItemForKey(_ key: CodingKeys, from container: KeyedDecodingContainer<CodingKeys>) throws -> Mixin? {
            switch key.stringValue {
            case Availability.mixinKey:
                return try container.decode(Availability.self, forKey: key)
            case Location.mixinKey:
                return try container.decode(Location.self, forKey: key)
            case Mutability.mixinKey:
                return try container.decode(Mutability.self, forKey: key)
            case FunctionSignature.mixinKey:
                return try container.decode(FunctionSignature.self, forKey: key)
            case DeclarationFragments.mixinKey:
                return try container.decode(DeclarationFragments.self, forKey: key)
            case Swift.Extension.mixinKey:
                return try container.decode(Swift.Extension.self, forKey: key)
            case Swift.Generics.mixinKey:
                return try container.decode(Swift.Generics.self, forKey: key)
            case SPI.mixinKey:
                return try container.decode(SPI.self, forKey: key)
            case Snippet.mixinKey:
                return try container.decode(Snippet.self, forKey: key)
            default:
                return nil
            }
        }