wire: move message buffers into workspace crates
This commit is contained in:
parent
d8380b3dce
commit
a1e4641e82
18 changed files with 187 additions and 166 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue