pub trait WritablePduWithTwoInputs<I1, I2, ErrorType> {
    const BASE_LENGTH: usize;

    // Required methods
    fn len(&self, input1: I1, input2: I2) -> usize;
    fn write<T: Write>(
        &self,
        _writer: &mut T,
        input1: I1,
        input2: I2
    ) -> Result<(), ErrorType>
       where Self: Sized;
}
Expand description

Generic trait for Writable Protocol Data Unit that doesn’t need any external input while writing the packet.

Required Associated Constants§

Required Methods§

source

fn len(&self, input1: I1, input2: I2) -> usize

The total length of the written buffer

Note: the Self::len might be less than the length value written in the PDU, since most PDUs don’t include the length of their ‘length’ field in the calculation

source

fn write<T: Write>( &self, _writer: &mut T, input1: I1, input2: I2 ) -> Result<(), ErrorType>where Self: Sized,

Implementors§