add typedef for pdu_ids

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-10-26 22:20:16 +00:00
parent 1e7207c230
commit f245389c02
3 changed files with 22 additions and 1 deletions

View file

@ -0,0 +1,13 @@
use crate::rooms::short::{ShortEventId, ShortRoomId};
#[derive(Clone, Copy)]
pub struct PduId {
_room_id: ShortRoomId,
_event_id: ShortEventId,
}
pub type RawPduId = [u8; PduId::LEN];
impl PduId {
pub const LEN: usize = size_of::<ShortRoomId>() + size_of::<ShortEventId>();
}