func singleValueContainer()

in Sources/StructuredFieldValues/Decoder/StructuredFieldValueDecoder.swift [183:193]


    func singleValueContainer() throws -> SingleValueDecodingContainer {
        // We have single value containers for items and bareItems.
        switch self.currentElement! {
        case .item(let item):
            return BareItemDecoder(item.bareItem, codingPath: self._codingStack.map { $0.key })
        case .bareItem(let bareItem):
            return BareItemDecoder(bareItem, codingPath: self._codingStack.map { $0.key })
        case .dictionary, .list, .innerList, .bareInnerList, .parameters:
            throw StructuredHeaderError.invalidTypeForItem
        }
    }