icydb 0.77.2

IcyDB — A type-safe, embedded ORM and schema system for the Internet Computer
Documentation
1
2
3
4
5
6
use crate::{design::prelude::*, traits::NumericValue};

/// Convert an arbitrary numeric value into `Decimal`.
pub(crate) fn try_cast_decimal<N: NumericValue>(value: &N) -> Option<Decimal> {
    value.try_to_decimal()
}