fn as_num<T>(variant: &Variant<'_, '_>) -> Option<T>where
T: DecimalCastTarget,Expand description
Converts a boolean or numeric variant(integers, floating-point, and decimals)
to the specified numeric type T.
Uses Arrow’s casting logic to perform the conversion. Returns Some(T) if
the conversion succeeds, None if the variant can’t be casted to type T.