forked from lavina/lavina
31 lines
548 B
Rust
31 lines
548 B
Rust
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 {
|
|
PrefixedNick {
|
|
prefix: Prefix::Empty,
|
|
nick,
|
|
}
|
|
}
|
|
}
|