added convenience function for getting basic type

This commit is contained in:
Nickiel12 2022-06-19 20:33:13 -07:00
parent dd9ceb6bc3
commit b3a39afa12

View file

@ -56,6 +56,18 @@ impl Scenes {
Scenes::Augmented => {String::from_str("Augmented").unwrap()}, Scenes::Augmented => {String::from_str("Augmented").unwrap()},
} }
} }
pub fn is_camera(&self) -> bool {
match self { Scenes::Camera => true, _ => false }
}
pub fn is_screen(&self) -> bool {
match self { Scenes::Screen => true, _ => false }
}
pub fn is_augmeted(&self) -> bool {
match self {Scenes::Augmented => true, _ => false }
}
} }
#[derive(PartialEq, Debug, Clone, Copy)] #[derive(PartialEq, Debug, Clone, Copy)]