diff --git a/server/src/channels.rs b/server/src/channels.rs index 687b6dc..ec55b24 100644 --- a/server/src/channels.rs +++ b/server/src/channels.rs @@ -9,7 +9,7 @@ use mysql_async::prelude::{params, Queryable}; use serde_json::Value; -enum ChannelType { +pub enum ChannelType { Voice, Text, Undefined @@ -17,14 +17,14 @@ enum ChannelType { impl ChannelType { // These funcs are mainly here to help translation from mysql - fn from_i32(x: i32) -> ChannelType { + pub fn from_i32(x: i32) -> ChannelType { match x { 1 => ChannelType::Voice, 2 => ChannelType::Text, _ => ChannelType::Undefined } } - fn as_i32(&self) -> i32 { + pub fn as_i32(&self) -> i32 { match self { ChannelType::Voice => 1, ChannelType::Text => 2, @@ -34,7 +34,7 @@ impl ChannelType { } // whole ass function exists because serde_json is a walking pos - fn from_i64_opt(x: Option) -> ChannelType { + pub fn from_i64_opt(x: Option) -> ChannelType { if let Some(i) = x { match i { 1 => ChannelType::Voice,