pub fn cast_ok(
source: &DataType,
target: &DataType,
allows: CastContext,
) -> bool
Expand description
Checks whether casting from source
to target
is ok in allows
context.
Equivalent to cast(..).is_ok()
, but cast
may be preferred for its error messages.