2023-09-15 16:33:25 +00:00
|
|
|
use super::*;
|
|
|
|
use std::fmt;
|
|
|
|
|
|
|
|
#[derive(Clone, Debug, PartialEq, Eq)]
|
|
|
|
pub enum Prefix {
|
|
|
|
Empty,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl fmt::Display for Prefix {
|
|
|
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
|
|
match self {
|
|
|
|
Prefix::Empty => write!(f, ""),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Clone, Debug, PartialEq, Eq)]
|
|
|
|
pub struct PrefixedNick {
|
|
|
|
pub prefix: Prefix,
|
|
|
|
pub nick: Str,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl PrefixedNick {
|
|
|
|
pub fn from_str(nick: Str) -> PrefixedNick {
|
2023-09-22 13:20:47 +00:00
|
|
|
PrefixedNick {
|
|
|
|
prefix: Prefix::Empty,
|
|
|
|
nick,
|
|
|
|
}
|
2023-09-15 16:33:25 +00:00
|
|
|
}
|
2023-09-22 13:20:47 +00:00
|
|
|
}
|