pub trait Serializer {
    type SerializeError: Debug;

    fn serialize<T: Counter, W: Write>(
        &mut self,
        h: &Histogram<T>,
        writer: &mut W
    ) -> Result<usize, Self::SerializeError>; }
Expand description

Histogram serializer.

Different implementations serialize to different formats.

Required Associated Types§

Error type returned when serialization fails.

Required Methods§

Serialize the histogram into the provided writer. Returns the number of bytes written, or an error.

Note that Vec<u8> is a reasonable Write implementation for simple usage.

Implementors§