cbf_compositor/model/
ids.rs1#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
3pub struct CompositorWindowId(u64);
4
5impl CompositorWindowId {
6 pub const fn new(raw: u64) -> Self {
8 Self(raw)
9 }
10
11 pub const fn get(self) -> u64 {
13 self.0
14 }
15}
16
17impl std::fmt::Display for CompositorWindowId {
18 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
19 write!(f, "{}", self.get())
20 }
21}
22
23#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
25pub struct CompositionItemId(u64);
26
27impl CompositionItemId {
28 pub const fn new(raw: u64) -> Self {
30 Self(raw)
31 }
32
33 pub const fn get(self) -> u64 {
35 self.0
36 }
37}
38
39impl std::fmt::Display for CompositionItemId {
40 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
41 write!(f, "{}", self.get())
42 }
43}