#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct WireFlags(pub u8);
impl WireFlags {
pub const EMPTY: Self = Self(0);
pub const CHECKSUM_PRESENT: Self = Self(1 << 0);
#[must_use]
pub const fn from_bits(bits: u8) -> Self {
Self(bits)
}
#[must_use]
pub const fn bits(self) -> u8 {
self.0
}
#[must_use]
pub const fn contains(self, other: Self) -> bool {
(self.0 & other.0) == other.0
}
#[must_use]
pub const fn union(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}