Skip to main content

Module numeric

Module numeric 

Source
Expand description

Cast support for numeric and boolean arrays.

Re-exportsΒ§

use crate::cast::*; πŸ”’

MacrosΒ§

numeric_native πŸ”’

StructsΒ§

NumericKind πŸ”’
Properties of a numeric native type that decide whether num_cast to another numeric type can fail.

TraitsΒ§

NumericNative πŸ”’
A native type with a NumericKind.

FunctionsΒ§

bool_to_numeric_cast πŸ”’
cast_bool_to_numeric πŸ”’
Cast Boolean types to numeric
cast_num_to_bool
Cast numeric types to boolean
cast_numeric_arrays πŸ”’
Convert Array into a PrimitiveArray of type, and apply numeric cast
cast_numeric_to_bool πŸ”’
Cast numeric types to Boolean
is_infallible_numeric_cast πŸ”’
Returns true if num_cast succeeds for every value of from when casting to to: every cast to a float, and integer casts whose target holds every source value.
num_cast
Natural cast between numeric types Return None if the input value can’t be casted to type O.
single_bool_to_numeric
Cast single bool value to numeric value.