1
0
Fork 0
forked from wry/wry

wire: move message buffers into workspace crates

This commit is contained in:
kossLAN 2026-05-29 11:07:43 -04:00
parent d8380b3dce
commit a1e4641e82
No known key found for this signature in database
18 changed files with 187 additions and 166 deletions

View file

@ -7,35 +7,13 @@ use {
std::{
any::Any,
cmp::Ordering,
fmt::{Display, Formatter},
rc::Rc,
},
};
pub use jay_wire_types::ObjectId;
pub const WL_DISPLAY_ID: WlDisplayId = WlDisplayId::from_raw(1);
#[derive(Debug, Copy, Clone, Hash, Ord, PartialOrd, Eq, PartialEq)]
pub struct ObjectId(u32);
impl ObjectId {
#[expect(dead_code)]
pub const NONE: Self = ObjectId(0);
pub fn from_raw(raw: u32) -> Self {
Self(raw)
}
pub fn raw(self) -> u32 {
self.0
}
}
impl Display for ObjectId {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
Display::fmt(&self.0, f)
}
}
pub trait ObjectBase: Any {
fn id(&self) -> ObjectId;
fn version(&self) -> Version;