#[repr(u8)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum CardType {
Sd,
Mmc,
}
impl CardType {
pub const fn new() -> Self {
Self::Sd
}
pub const fn is_sd(&self) -> bool {
matches!(self, Self::Sd)
}
pub const fn is_mmc(&self) -> bool {
matches!(self, Self::Mmc)
}
}
impl Default for CardType {
fn default() -> Self {
Self::new()
}
}