serializedData(partial:)

Returns a Data instance containing the Protocol Buffer binary format serialization of the message.

Message+BinaryAdditions_Data.swift:214
func serializedData(partial: Bool = false) throws -> Data

Parameters

partial

If false (the default), this method will check isInitialized before encoding to verify that all required fields are present. If any are missing, this method throws missingRequiredFields.

Returns

A Data instance containing the binary serialization of the message.

Throws

BinaryEncodingError if encoding fails.