pub fn cast(
source: &DataType,
target: &DataType,
allows: CastContext,
) -> Result<(), CastError>Expand description
Checks whether casting from source to target is ok in allows context.
Returns an error if the cast is not possible.