pub fn write_dlg_to_vec(dlg: &Dlg) -> Result<Vec<u8>, DlgError>
Serializes typed DLG data into a byte vector.