pub fn to_msg(&self) -> String {
        match &self {
            Msg::Ping(content) => String::from("P@") + content,
            Msg::Message(content) => String::from("M@") + content,
            Msg::Kill() => String::from("K@0"),
        }
    }
/// Convert a message - ensures format as the listener expects it.
Convert a message - ensures format as the listener expects it.
Convert a message - ensures format as the listener expects it .
pub fn to_msg(&self) -> String {
        match &self {
            Msg::Ping(content) => String::from("P@") + content,
            Msg::Message(content) => String::from("M@") + content,
            Msg::Kill() => String::from("K@0"),
        }
    }
pub fn to_msg ( & self ) -> String { match & self { Msg :: Ping ( content ) => String :: from ( " " ) + content , Msg :: Message ( content ) => String :: from ( " " ) + content , Msg :: Kill ( ) => String :: from ( " " ) , } }
Convert a message - ensures format as the listener expects it.
Convert a message - ensures format as the listener expects it .
&self
&self