Closed LuckyTurtleDev closed 6 months ago
I don't think this is possible. The part after deserialize_as
needs to be a type/function that handles the null
can call the provided function. You can do such parametrization using types, but functions are not types, but values. Basically, you cannot have a DefaultOnNull<default_template>
or a default_on_null::<default_template>()
. As such, I don't know how to make DefaultOnNull
aware to call default_template
, since it cannot store that value anywhere.
Something like this would be nice