mirror of
https://github.com/apple/swift-nio-imap
synced 2026-11-26 04:57:51 +00:00
* Define basic KeyValue type * Remove TaggedExtension * Replace Parameter * Remove ParameterPair * Remove EntryValue * Remove OptionExtension * Soudness * Docs * Inline * Soundness * PR comments
32 lines
895 B
Swift
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
|
|
}
|
|
}
|