#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
#[expect(
clippy::module_name_repetitions,
reason = "the type is going to be used outside this module"
)]
pub struct ParcelAccessFlags(pub u32);
impl ParcelAccessFlags {
pub const NONE: Self = Self(0);
pub const ACCESS: Self = Self(1 << 0);
pub const BAN: Self = Self(1 << 1);
pub const ALLOW_EXPERIENCE: Self = Self(1 << 3);
pub const BLOCK_EXPERIENCE: Self = Self(1 << 4);
#[must_use]
pub const fn union(self, other: Self) -> Self {
Self(self.0 | other.0)
}
#[must_use]
pub const fn contains(self, other: Self) -> bool {
self.0 & other.0 == other.0
}
#[must_use]
pub const fn is_empty(self) -> bool {
self.0 == 0
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[expect(
clippy::module_name_repetitions,
reason = "the type is going to be used outside this module"
)]
pub struct ParcelReturnType(pub u32);
impl ParcelReturnType {
pub const NONE: Self = Self(1 << 0);
pub const OWNER: Self = Self(1 << 1);
pub const GROUP: Self = Self(1 << 2);
pub const OTHER: Self = Self(1 << 3);
pub const LIST: Self = Self(1 << 4);
pub const SELL: Self = Self(1 << 5);
#[must_use]
pub const fn union(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}