Skip to main content

serialize_decimal

Function serialize_decimal 

Source
pub fn serialize_decimal<S: Serializer>(
    d: &Decimal,
    s: S,
) -> Result<S::Ok, S::Error>
Expand description

Serializes a Decimal as a JSON number (float).

Used for outgoing requests where exchange APIs expect JSON numbers.

ยงErrors

Returns an error if serialization fails.