Skip to main content

PolymorphismTrampoline

No overview available.

Attributes

AttributeTypeDescription
classPy< PyType >The Python type used as the base for determining polymorphic behavior during serialization.
serializerArc< CombinedSerializer >Inner serializer used when the type is not a subclass (responsible for any fallback etc).
enabled_from_configboolWhether polymorphic serialization is enabled from config.

Constructor

Signature

def PolymorphismTrampoline(
class: Py< PyType >,
serializer: Arc< CombinedSerializer >,
enabled_from_config: bool
)

Parameters

NameTypeDescription
classPy< PyType >The Python class type associated with this trampoline.
serializerArc< CombinedSerializer >The inner serializer used when the type is not a subclass.
enabled_from_configboolFlag indicating if polymorphic serialization is enabled via configuration.

Signature

def PolymorphismTrampoline(
class: PyType,
serializer: CombinedSerializer,
enabled_from_config: bool
) - > null

Parameters

NameTypeDescription
classPyTypeThe Python class type used to determine if a value is a subclass for polymorphic dispatch
serializerCombinedSerializerThe internal serializer instance responsible for handling standard serialization or fallback logic
enabled_from_configboolA flag indicating whether polymorphic serialization behavior is active based on the current configuration