use serde_repr::{Deserialize_repr, Serialize_repr};
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize_repr, Deserialize_repr)]
#[repr(u8)]
pub enum TextureSlot {
Base = 1,
}
impl TryFrom<u8> for TextureSlot {
type Error = ();
fn try_from(value: u8) -> Result<Self, Self::Error> {
match value {
1 => Ok(Self::Base),
_ => Err(()),
}
}
}
impl From<TextureSlot> for u8 {
fn from(value: TextureSlot) -> Self {
value as u8
}
}