Trait temporenc::Serializable [] [src]

pub trait Serializable {
    fn max_serialized_size() -> usize;
    fn serialized_size(&self) -> usize;
    fn serialize<W: Write>(
        &self,
        writer: &mut W
    ) -> Result<usize, SerializationError>; }

Serialize into the Temporenc binary format.

Required Methods

The largest encoded size of any instance of the type. Some types have variable precision, and instances with higher precision will use more bytes than those with lower precision.

The encoded size of this instance. No larger than max_serialized_size().

Serialize into the provided writer with the Temporenc format. Returns the number of bytes written, which will be the same as serialized_size().

Implementors