Keep adding docs

This commit is contained in:
2025-08-10 22:06:46 -03:00
parent 0ffb62a7dc
commit 1f002cb7ca
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -38,12 +38,14 @@
//! let args = Args::parse();
//! ```
/// Payphone's argument parser.
#[derive(clap::Parser)]
pub struct Args {
/// The Discord bot token to run the bot with.
#[arg(env = "PAYPHONE_TOKEN")]
pub token: String,
/// The minimum level logs have to be to be outputted into the console, or off for no logs.
#[arg(
long,
short,
@@ -55,6 +57,7 @@ pub struct Args {
)]
pub logging: LevelFilter,
/// The socket address of the database to connect to, a Scylla node.
#[arg(
long,
short,
@@ -65,6 +68,10 @@ pub struct Args {
pub database_addr: String,
}
/// An enum with the different logging levels that can be used in the CLI.
///
/// This enum is used to parse the `--logging` or `-l` command line argument and then map the value
/// to [`log::LevelFilter`].
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, clap::ValueEnum)]
pub enum LevelFilter {
Off,