Skip to main content

Unmarshal

No overview available.

Methods


Unmarshal()

def Unmarshal(
r: io.Reader,
msg: proto.Message
) - > error

Unmarshals data from a reader into a protobuf message. This function is used to deserialize incoming data streams into a structured protobuf format for further processing.

Parameters

NameTypeDescription
rio.ReaderThe input reader from which the data will be read for unmarshaling. This typically represents a network stream or a file.
msgproto.MessageThe protobuf message into which the unmarshaled data will be stored. This message must be a pointer to a protobuf message type.

Returns

TypeDescription
errorAn error if the unmarshaling process fails, otherwise nil.