use std::io; /// A value that can encode itself to a `Write`. pub trait EncodeToWrite { /// Encodes the value to the `Write`. Returns the length of the encoded value. fn encode_to_write(&self, w: &mut W) -> Result where W: io::Write; }