use std::marker::PhantomData; #[derive(Default)] pub struct BanlistCommand { state: PhantomData } pub struct NoFilter; pub struct Ips; pub struct Players; impl BanlistCommand { pub(crate) fn new() -> Self { Self { state: PhantomData } } pub fn players(self) -> BanlistCommand { BanlistCommand { state: PhantomData } } pub fn ips(self) -> BanlistCommand { BanlistCommand { state: PhantomData } } pub fn build(self) -> super::Command { super::Command::raw("banlist") } } impl BanlistCommand { pub fn build(self) -> super::Command { super::Command::raw("banlist players") } } impl BanlistCommand { pub fn build(self) -> super::Command { super::Command::raw("banlist ips") } }