The target object, with its types appropriately cast.
Arguments
template
A named list to use as a template.
target
A named list to use as the output.
with_cast
If true, edits the target instead of just checking types.
log_items
Which debug info to print. Takes a character vector. By default, logs casts and excess fields (target fields not in template). We expect some missing for the moment.