add typedef for pdu_ids
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
1e7207c230
commit
f245389c02
3 changed files with 22 additions and 1 deletions
13
src/service/rooms/timeline/pduid.rs
Normal file
13
src/service/rooms/timeline/pduid.rs
Normal 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>();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue