You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
538 B

//! Parse args
use super::*;
#[derive(Debug, PartialEq, Eq, Clone)]
pub enum Operation
{
#[cfg(feature="server")] Server(server::Config),
#[cfg(feature="client")] Client(client::Config),
Help,
}
#[derive(Debug)]
pub struct Error;
pub fn parse_args() -> impl Future<Output = Result<Operation, Error>>
{
parse(std::env::args().skip(1))
}
async fn parse<T, I>(args: I) -> Result<Operation, Error>
where I: IntoIterator<Item = T>,
T: Into<String>
{
let mut args = args.into_iter().map(Into::into);
todo!()
}