use super::*; impl ProcessArgs { pub fn parse(string: &mut T, not_last: &mut bool) -> Result where T: Iterator, U: AsRef { let name = string.next().ok_or("No process name")?.as_ref().to_owned(); let mut args = Vec::new(); *not_last = false; while let Some(arg) = string.next() { let arg = arg.as_ref(); let mut chars = arg.chars(); if let Some(BROKEN_PIPE) = chars.next() { *not_last = true; break; } else { args.push(arg.to_owned()); } } Ok(Self{ name, args, }) } pub fn verify(&self) -> Result<(), &'static str> { //TODO: Check file path of executable Ok(()) } } //TODO: impl fmt::Display for ProcessArgs