# serializedBytes Source: https://www.nianticspatial.com/docs/api/swift/NSDK.Nsdk_Vps_VpsSegmentTarget.method-serializedBytes/ serializedBytes --- ## Declaration func serializedBytes(partial: Bool = false, options: BinaryEncodingOptions = BinaryEncodingOptions()) throws -> Bytes where Bytes : SwiftProtobufContiguousBytes #### Summary Returns a SwiftProtobufContiguousBytes instance containing the Protocol Buffer binary format serialization of the message. #### Returns A SwiftProtobufContiguousBytes instance containing the binary serialization of the message. #### Throws SwiftProtobufError or BinaryEncodingError if encoding fails. ### Parameters | Name | Type | Summary | | --- | --- | --- | | partial | Bool | If `false` (the default), this method will check `Message.isInitialized` before encoding to verify that all required fields are present. If any are missing, this method throws. `BinaryEncodingError/missingRequiredFields`. | | options | BinaryEncodingOptions | The `BinaryEncodingOptions` to use. | ---