Traitsยง
- Decimal
Cast - A utility trait that provides checked conversions between
decimal types inspired by
NumCast
Functionsยง
- apply_
decimal_ ๐cast - apply_
rescaler ๐ - Apply the rescaler function to the value. If the rescaler is infallible, use the infallible function. Otherwise, use the fallible function and validate the precision.
- cast_
decimal_ ๐to_ decimal - cast_
decimal_ ๐to_ decimal_ error - cast_
decimal_ ๐to_ decimal_ same_ type - cast_
decimal_ ๐to_ float - Cast a decimal array to a floating point array.
- cast_
decimal_ ๐to_ integer - cast_
floating_ ๐point_ to_ decimal - cast_
string_ ๐to_ decimal - Cast Utf8 to decimal
- convert_
to_ ๐bigger_ or_ equal_ scale_ decimal - convert_
to_ ๐smaller_ scale_ decimal - generic_
string_ ๐to_ decimal_ cast - make_
downscaler ๐ - Construct closures to downscale decimals from
(input_precision, input_scale)to(output_precision, output_scale). - make_
upscaler ๐ - Construct closures to upscale decimals from
(input_precision, input_scale)to(output_precision, output_scale). - parse_
string_ ๐to_ decimal_ native - Parses given string to specified decimal native (i128/i256) based on given
scale. Returns an
Errif it cannot parse given string. - rescale_
decimal - Rescales a decimal value from
(input_precision, input_scale)to(output_precision, output_scale)and returns the converted number when it fits within the output precision. - string_
to_ ๐decimal_ cast - string_
view_ ๐to_ decimal_ cast