Files
continuwuity/src/core/utils/clap.rs
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
469 B
Rust
Raw Normal View History

2024-03-12 22:20:03 -04:00
//! Integration with `clap`
2024-03-13 02:12:14 -04:00
use std::path::PathBuf;
2024-05-09 15:59:08 -07:00
pub use clap::Parser;
2024-03-12 22:20:03 -04:00
use super::conduwuit_version;
2024-03-12 22:20:03 -04:00
/// Commandline arguments
#[derive(Parser, Debug)]
#[clap(version = conduwuit_version(), about, long_about = None)]
2024-05-09 15:59:08 -07:00
pub struct Args {
2024-03-12 22:20:03 -04:00
#[arg(short, long)]
/// Optional argument to the path of a conduwuit config TOML file
2024-05-09 15:59:08 -07:00
pub config: Option<PathBuf>,
2024-03-12 22:20:03 -04:00
}
/// Parse commandline arguments into structured data
#[must_use]
2024-05-09 15:59:08 -07:00
pub fn parse() -> Args { Args::parse() }