Function to_bytes_versioned

Source
pub fn to_bytes_versioned(msg: VersionedMessage, py: Python<'_>) -> &PyBytes
Expand description

Serialize a versioned message, with a leading byte indicating whether or not it’s a legacy message.

If you want to serialize without the leading byte, use bytes(msg).

Args: msg (VersionedMessage): The message to serialize.

Returns: bytes: the serialized message.