pub fn write_record( output: &mut impl Write, data: &[u8], format: RecordFormat, ) -> Result<()>
Write one record using the selected framing format.
Returns an error when the delegated framing write fails.