class documentation

class TransferTypeConverter(Generic[ValueT, TransferTypeT], ABC): (source)

View In Hierarchy

Converter between a user-facing value and a transfer type value.

Warning

This API is experimental and subject to change.

Method from_transfer_type Convert a transfer type value to its user-facing value.
Method to_transfer_type Convert a user-facing value to its transfer type value.
Class Variable transfer_type Optional type hint for the transfer type to use when decoding payloads.
@abstractmethod
def from_transfer_type(self, value: TransferTypeT) -> ValueT: (source)

Convert a transfer type value to its user-facing value.

Warning

This API is experimental and subject to change.

@abstractmethod
def to_transfer_type(self, value: ValueT) -> TransferTypeT: (source)

Convert a user-facing value to its transfer type value.

Warning

This API is experimental and subject to change.

transfer_type: type[TransferTypeT] | None = (source)

Optional type hint for the transfer type to use when decoding payloads.

Warning

This API is experimental and subject to change.