enc 0.10.0

This library aids in processing encoded data.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::StreamError;
use std::io::Write;

/// 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<W>(&self, w: &mut W) -> Result<usize, StreamError>
    where
        W: Write;
}