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
fn encode_decimal(&mut self, decimal: &Decimal) -> IonResult<usize>
fn encode_decimal(&mut self, decimal: &Decimal) -> IonResult<usize>
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.