pub trait TimestampBinaryEncoder {
    // Required methods
    fn encode_timestamp(&mut self, timestamp: &Timestamp) -> IonResult<usize>;
    fn encode_timestamp_value(
        &mut self,
        timestamp: &Timestamp
    ) -> IonResult<usize>;
}
Expand description

Provides support to write Timestamp into Ion binary.

Required Methods§

source

fn encode_timestamp(&mut self, timestamp: &Timestamp) -> IonResult<usize>

Encodes the content of a Timestamp 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 TimestampBinaryEncoder::encode_timestamp_value for that.

source

fn encode_timestamp_value(&mut self, timestamp: &Timestamp) -> IonResult<usize>

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

Implementors§

source§

impl<W> TimestampBinaryEncoder for Wwhere W: Write,