proto-packet 0.1.0-rc.13

This library provides the dependencies for generated ProtoPacket code.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/// Responsible for encoding values.
#[derive(Copy, Clone, Debug)]
pub struct Encoder<'a, T> {
    pub(in crate::io::encode) value: &'a T,
    pub(in crate::io::encode) fixed: bool,
}

impl<'a, T> Encoder<'a, T> {
    //! Construction

    /// Creates a new encoder.
    pub const fn new(value: &'a T, fixed: bool) -> Self {
        Self { value, fixed }
    }
}