use command::{IrcCommand, IrcCommandLine, Numeric, Stringy}; pub struct SimpleIrcCommand { command: Vec, arguments: (Vec>, Vec) } impl IrcCommandLine for SimpleIrcCommand { fn get_command<'a>(&'a self) -> IrcCommand<'a> { IrcCommand::new(&self.command) } fn get_argument<'a>(&'a self, arg: usize) -> &'a [u8] { self.arguments.1[self.arguments.0[arg].clone()] // awful API there, rust. } fn get_argument_count(&self) -> usize { self.arguments.0.len() } } pub struct NoIrcConnection; impl NoIrcConnection { fn read_command(reader: R) -> SimpleIrcCommand { } }