antimatter.fieldtype.converters#

Module Contents#

Classes#

class antimatter.fieldtype.converters.Standard#
static field_converter_from_generic(ft: antimatter.fieldtype.fieldtypes.FieldType) Callable[[bytes], Any] | None#

field_converter_from_generic gets a field converter function for the given field type that can be used to convert fields from their generic string type to their specific type.

Parameters:

ft – the FieldType to get the converter function for

Returns:

a function that can convert field values from generic form

static field_converter_to_generic(ft: antimatter.fieldtype.fieldtypes.FieldType) Callable[[Any], bytes] | None#

field_converter_to_generic gets a field converter function for the given field type that can be used to convert fields from their specific type to their generic type.

Parameters:

ft – the FieldType to get the converter function for

Returns:

a function that can convert field values to generic form