#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "fuzzing", derive(arbitrary::Arbitrary))]
pub enum Bracket {
Round,
Square,
}
impl Bracket {
#[must_use]
pub const fn opening(&self) -> char {
match self {
Self::Round => '(',
Self::Square => '[',
}
}
#[must_use]
pub const fn closing(&self) -> char {
match self {
Self::Round => ')',
Self::Square => ']',
}
}
}