UnmarshalBytesToPb
Unmarshals a byte slice to a proto message.
def UnmarshalBytesToPb(
b: []byte,
msg: proto.Message
) - > error
Unmarshals a byte slice to a proto message.
Parameters
| Name | Type | Description |
|---|---|---|
| b | []byte | The byte slice containing the data to be unmarshaled into the proto message. |
| msg | proto.Message | The proto message into which the bytes will be unmarshaled. This message will be populated with the data from the byte slice. |
Returns
| Type | Description |
|---|---|
error | An error if the unmarshaling fails, otherwise nil. |