pub trait DecimalBinaryEncoder {
    fn encode_decimal(&mut self, decimal: &Decimal) -> IonResult<usize>;
    fn encode_decimal_value(&mut self, decimal: &Decimal) -> IonResult<usize>;
}
Expand description

Provides support to write Decimal into Ion binary.

Required Methods

Encodes the content of a Decimal as per the Ion binary encoding. Returns the length of the encoded bytes.

This does not encode the type descriptor nor the associated length. Prefer DecimalBinaryEncoder::encode_decimal_value for that.

Encodes a Decimal as an Ion value with the type descriptor and length. Returns the length of the encoded bytes.

Implementors