to Enum
inline fun <E : Enum<E>> TomlLiteral.toEnum(serializersModule: SerializersModule = EmptySerializersModule()): E(source)
Returns content as an enum value of the corresponding type.
Parameters
serializers Module
could be ignored, but for contextual serialization, this should be present.
Throws
if content cannot be converted into E.