Trait ion_rs::binary::timestamp::TimestampBinaryEncoder
source · 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§
sourcefn encode_timestamp(&mut self, timestamp: &Timestamp) -> IonResult<usize>
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.