We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2be4be7 commit 49962adCopy full SHA for 49962ad
Sources/GRPCCore/Metadata.swift
@@ -178,6 +178,13 @@ public struct Metadata: Sendable, Hashable {
178
self.elements.append(contentsOf: other.map(KeyValuePair.init))
179
}
180
181
+ /// Add the contents of another `Metadata` to this instance.
182
+ ///
183
+ /// - Parameter other: the `Metadata` whose key-value pairs should be added into this one.
184
+ public mutating func add(contentsOf other: Metadata) {
185
+ self.elements.append(contentsOf: other.elements)
186
+ }
187
+
188
/// Removes all values associated with the given key.
189
///
190
/// - Parameter key: The key for which all values should be removed.
0 commit comments