pub fn to_decimal(v: &Value) -> DogeResultExpand description
dec(x) — an exact Decimal. An Int converts exactly; a Bool to 0/1; a
numeric Str parses exactly (dec("0.10")); a Float converts via its shortest
decimal form, so dec(0.1) is exactly 0.1 and not the binary noise a raw
cast would carry. A Decimal is returned unchanged. A non-numeric Str is a
catchable ValueError; other types are a TypeError.