decodeWithDefaults

inline fun <T> decodeWithDefaults(defaultValue: T, tomlValue: TomlValue): T

Like decode, but will fill in any missing fields from the defaultValue. Appropriate for use cases such as configuration files, where you may not want to force the user to configure every last thing, but just override the bits they want to customize.

Values from defaultValue take priority over any default values set in the target class itself.