pub fn write_to_slice(
        self,
        out: &mut [u8],
    ) -> Result<(), ModbusSerializationError> {
        if out.len() < 5 {
            return Err(ModbusSerializationError::InsufficientBuffer {
                expected: 5,
                got: out.len(),
            });
        }

        unsafe { self.write_to_slice_unchecked(out) };
        Ok(())
    }
/// Write this request to the slice as modbus data
Write this request to the slice as modbus data
Write this request to the slice as modbus data
pub fn write_to_slice(
        self,
        out: &mut [u8],
    ) -> Result<(), ModbusSerializationError> {
        if out.len() < 5 {
            return Err(ModbusSerializationError::InsufficientBuffer {
                expected: 5,
                got: out.len(),
            });
        }
        unsafe { self.write_to_slice_unchecked(out) };
        Ok(())
    }
pub fn write_to_slice ( self , out : & mut [ u8 ] , ) -> Result < ( ) , ModbusSerializationError > { if out . len ( ) < 5 { return Err ( ModbusSerializationError :: InsufficientBuffer { expected : 5 , got : out . len ( ) , } ) ; } unsafe { self . write_to_slice_unchecked ( out ) } ; Ok ( ( ) ) }
Write this request to the slice as modbus data
Write this request to the slice as modbus data
self
out
&mut [u8]
self
out
&mut [u8]