eye_config 0.5.1

A configuration persistence library and CLI tool.
Documentation
use clap::Parser;

#[derive(Debug, Parser, Clone)]
#[cfg_attr(feature = "bevy", derive(bevy_reflect::Reflect))]
#[cfg_attr(feature = "bevy", reflect(Resource))]
pub struct GlobalArgs {
    /// Enable debug logging
    #[arg(long, global = true, default_value_t = false)]
    pub debug: bool,
    /// If false, the program will error when interaction is requested
    #[arg(long, global = true, default_value_t = true)]
    pub interactive: bool,
    /// If true, any confirmation prompt will be automatically approved
    #[arg(long, global = true, default_value_t = false)]
    pub auto_approve: bool,
}

impl Default for GlobalArgs {
    fn default() -> Self {
        Self {
            debug: false,
            interactive: true,
            auto_approve: false,
        }
    }
}