encodeToTomlElement

inline fun <T> Toml.encodeToTomlElement(value: T): TomlElement(source)

Serializes value into TomlElement using the serializer retrieved from reified type parameter.

Throws

TomlEncodingException

if value cannot be serialized.