'An enum is encoded by a int, representing the zero-based position
of the symbol in the schema.'

def write_enum(self, writers_schema, datum, encoder):

    index_of_datum = writers_schema.symbols.index(datum)
    encoder.write_int(index_of_datum)
