Instance Method
isCastable(to:)
Returns
true if concrete object can be exactly or losslessly cast to a second typefunc isCastable(to type: LeafData.NaturalType) -> Bool
Discussion
EG:
.nil->.string(""),.int(1)->.double(1.0),.bool(true)->.string("true")are all one-way lossless conversionsThis does not imply it’s not possible to coerce data - handle with
coerce(to:)EG:.string("")->.nil,.string("1")->.bool(true)