merge
Declaration
mutating func merge(from source: Self, fieldMask: Google_Protobuf_FieldMask, mergeOption: Google_Protobuf_FieldMask.MergeOptions = .init()) throws
Summary
Parameters
Overload 1
mutating func merge<Bytes>(serializedBytes bytes: Bytes, extensions: (any ExtensionMap)? = nil, partial: Bool = false, options: BinaryDecodingOptions = BinaryDecodingOptions()) throws where Bytes : SwiftProtobufContiguousBytes
Summary
Updates the message by decoding the given SwiftProtobufContiguousBytes value
containing a serialized message in Protocol Buffer binary format into the
receiver.
Throws
BinaryDecodingErrorif decoding fails.
Notice
Note: If this method throws an error, the message may still have been partially mutated by the binary data that was decoded before the error occurred.
Parameters
| Name | Type | Summary |
|---|---|---|
| bytes | Bytes | The binary-encoded message data to decode. |
| extensions | (any ExtensionMap)? | An ExtensionMap used to look up and decode anyextensions in this message or messages nested within this message's fields. |
| partial | Bool | If false (the default), this method will checkMessage/isInitialized-6abgi after decoding to verify that all requiredfields are present. If any are missing, this method throws BinaryDecodingError/missingRequiredFields. |
| options | BinaryDecodingOptions | The BinaryDecodingOptions to use. |
Overload 2
mutating func merge(serializedBytes bytes: RawSpan, extensions: (any ExtensionMap)? = nil, partial: Bool = false, options: BinaryDecodingOptions = BinaryDecodingOptions()) throws
Summary
Updates the message by decoding the bytes provided by a RawSpan containing
a serialized message in Protocol Buffer binary format into the receiver.
Throws
BinaryDecodingErrorif decoding fails.
Notice
Note: If this method throws an error, the message may still have been partially mutated by the binary data that was decoded before the error occurred.
Parameters
| Name | Type | Summary |
|---|---|---|
| bytes | RawSpan | The RawSpan of binary-encoded message data to decode. |
| extensions | (any ExtensionMap)? | An ExtensionMap used to look up and decode anyextensions in this message or messages nested within this message's fields. |
| partial | Bool | If false (the default), this method will checkMessage/isInitialized-6abgi after decoding to verify that all requiredfields are present. If any are missing, this method throws BinaryDecodingError/missingRequiredFields. |
| options | BinaryDecodingOptions | The BinaryDecodingOptions to use. |
Overload 3
mutating func merge<Bytes>(contiguousBytes bytes: Bytes, extensions: (any ExtensionMap)? = nil, partial: Bool = false, options: BinaryDecodingOptions = BinaryDecodingOptions()) throws where Bytes : ContiguousBytes
Merges fields specified in a FieldMask into another message.