fugue_bytes/endian.rs
1#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2#[derive(serde::Deserialize, serde::Serialize)]
3pub enum Endian {
4 Big,
5 Little,
6}
7
8impl Endian {
9 pub fn is_big(&self) -> bool {
10 matches!(self, Self::Big)
11 }
12
13 pub fn is_little(&self) -> bool {
14 matches!(self, Self::Little)
15 }
16}