use std::fmt::{self, Display, Formatter};
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
pub struct ChunkType(pub(crate) [u8; 4]);
impl ChunkType {
    pub const AHED: ChunkType = ChunkType(*b"AHED");
    pub const AEND: ChunkType = ChunkType(*b"AEND");
    pub const ANXT: ChunkType = ChunkType(*b"ANXT");
    pub const FHED: ChunkType = ChunkType(*b"FHED");
    pub const PHSF: ChunkType = ChunkType(*b"PHSF");
    pub const FDAT: ChunkType = ChunkType(*b"FDAT");
    pub const FEND: ChunkType = ChunkType(*b"FEND");
    pub const SHED: ChunkType = ChunkType(*b"SHED");
    pub const SDAT: ChunkType = ChunkType(*b"SDAT");
    pub const SEND: ChunkType = ChunkType(*b"SEND");
    #[allow(non_upper_case_globals)]
    pub const cTIM: ChunkType = ChunkType(*b"cTIM");
    #[allow(non_upper_case_globals)]
    pub const mTIM: ChunkType = ChunkType(*b"mTIM");
    #[allow(non_upper_case_globals)]
    pub const fPRM: ChunkType = ChunkType(*b"fPRM");
    #[allow(clippy::len_without_is_empty)]
    pub const fn len(&self) -> usize {
        self.0.len()
    }
}
impl Display for ChunkType {
    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
        f.write_str(unsafe { std::str::from_utf8_unchecked(&self.0) })
    }
}
#[cfg(test)]
mod tests {
    use super::*;
    #[test]
    fn to_string() {
        assert_eq!("AHED", ChunkType::AHED.to_string());
    }
}