1#[doc = crate::_tags!(ui ord)]
7#[doc = crate::_doc_meta! {
9 location("ui/view", struct UiLayer),
10 test_size_of(UiLayer = 2|16; niche !Option),
11}]
12#[must_use]
13#[repr(transparent)]
14#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
15pub struct UiLayer(i16);
16
17#[rustfmt::skip]
18impl UiLayer {
19 pub const BASE: Self = Self(0);
21
22 pub const fn new(raw: i16) -> Self { Self(raw) }
24
25 #[must_use]
27 pub const fn raw(self) -> i16 { self.0 }
28
29 pub const fn above(self) -> Self { Self(self.0 + 1) }
31 pub const fn below(self) -> Self { Self(self.0 - 1) }
33}