encode_message
faststream.broker.parsers.encode_message #
encode_message(msg: Union[Sequence[SendableMessage], SendableMessage]) -> Tuple[bytes, Optional[ContentType]]
Encodes a message.
PARAMETER | DESCRIPTION |
---|---|
msg | The message to be encoded. |
RETURNS | DESCRIPTION |
---|---|
Tuple[bytes, Optional[ContentType]] | A tuple containing the encoded message as bytes and the content type of the message. |