From b3a39afa12d6e130eb923144c5847cc16799295d Mon Sep 17 00:00:00 2001 From: Nickiel12 <35903114+Nickiel12@users.noreply.github.com> Date: Sun, 19 Jun 2022 20:33:13 -0700 Subject: [PATCH] added convenience function for getting basic type --- src/modules/stream_states/enums.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/modules/stream_states/enums.rs b/src/modules/stream_states/enums.rs index b123957..f5f8676 100644 --- a/src/modules/stream_states/enums.rs +++ b/src/modules/stream_states/enums.rs @@ -56,6 +56,18 @@ impl Scenes { 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)]