3.0.ipv8.messaging.payload_dataclass ==================================== .. py:module:: 3.0.ipv8.messaging.payload_dataclass Classes ------- .. autoapisummary:: 3.0.ipv8.messaging.payload_dataclass.DataClassPayload Functions --------- .. autoapisummary:: 3.0.ipv8.messaging.payload_dataclass.type_from_format Module Contents --------------- .. py:function:: type_from_format(fmt: str) -> TypeVar Convert a Serializer format directive to a type usable with @dataclass. .. py:class:: DataClassPayload(*args: Any, **kwargs) Bases: :py:obj:`3.0.ipv8.messaging.lazy_payload.VariablePayload` A Payload that is defined as a dataclass. .. py:method:: __class_getitem__(item: int) -> DataClassPayloadWID :classmethod: Syntactic sugar to add a msg_id attribute into the class inheritance structure. | .. code-block:: class MyPayload(DataClassPayload[12]): pass assert MyPayload().msg_id == 12 :param item: The item to get, i.e., the message id