Trait WritablePduWithTwoInputs

Source
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,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§