1
0
Fork 0
forked from wry/wry

all: refactor to cargo workspace, remove config shared library, remove protocol perms, add dpms cli (#7)

This commit is contained in:
kossLAN 2026-06-06 23:14:53 -04:00
parent 5db14936e7
commit bfc2a525de
616 changed files with 32344 additions and 31026 deletions

View file

@ -0,0 +1,5 @@
[package]
name = "jay-wire-types"
version.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -0,0 +1,68 @@
use std::fmt::{Display, Formatter, LowerHex};
#[derive(Debug, Copy, Clone, Hash, Ord, PartialOrd, Eq, PartialEq)]
pub struct ObjectId(u32);
impl ObjectId {
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)
}
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
pub struct GlobalName(u32);
impl GlobalName {
pub fn from_raw(id: u32) -> Self {
Self(id)
}
pub fn raw(self) -> u32 {
self.0
}
}
impl Display for GlobalName {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
Display::fmt(&self.0, f)
}
}
#[derive(Debug, Copy, Clone, Hash, Ord, PartialOrd, Eq, PartialEq)]
pub struct EiObjectId(u64);
impl EiObjectId {
pub const NONE: Self = EiObjectId(0);
pub fn from_raw(raw: u64) -> Self {
Self(raw)
}
pub fn raw(self) -> u64 {
self.0
}
}
impl Display for EiObjectId {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
Display::fmt(&self.0, f)
}
}
impl LowerHex for EiObjectId {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
LowerHex::fmt(&self.0, f)
}
}