Files
swift-nio-imap/Sources/NIOIMAPCore/Grammar/KeyValue.swift
T
David Evans df5074856c Remove all minor Key/Value types (#430)
* Define basic KeyValue type

* Remove TaggedExtension

* Replace Parameter

* Remove ParameterPair

* Remove EntryValue

* Remove OptionExtension

* Soudness

* Docs

* Inline

* Soundness

* PR comments
2021-02-04 11:03:41 +00:00

32 lines
895 B
Swift

//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2021 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIO project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
/// Pairs a key with a value
public struct KeyValue<Key: Hashable, Value: Hashable>: Hashable {
/// The key
public var key: Key
/// The value
public var value: Value
/// Creates a new `KeyValue`
/// - parameter key: The key
/// - parameter value: The value
@inlinable
public init(key: Key, value: Value) {
self.key = key
self.value = value
}
}