winctx/area_id.rs
1/// The identifier for an [`Area`].
2///
3/// [`Area`]: crate::area::Area
4#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
5#[repr(transparent)]
6pub struct AreaId(u32);
7
8impl AreaId {
9 /// Construct a new menu id.
10 pub(crate) const fn new(id: u32) -> Self {
11 Self(id)
12 }
13
14 /// Get the menu id.
15 pub(crate) const fn id(&self) -> u32 {
16 self.0
17 }
18}