import io
from typing import Any, Protocol, runtime_checkable
[docs]
class IPayloadHolder(Protocol):
[docs]
def set_payload(self, value: Any):
...
[docs]
def get_payload(self) -> Any:
...
[docs]
@runtime_checkable
class ISingleValue(IPayloadHolder, Protocol):
[docs]
def encode_nested(self, writer: io.BytesIO):
...
[docs]
def encode_top_level(self, writer: io.BytesIO):
...
[docs]
def decode_nested(self, reader: io.BytesIO):
...
[docs]
def decode_top_level(self, data: bytes):
...