#![no_std]
#[cfg(feature = "std")]
extern crate std;
pub mod build;
pub mod errors;
pub mod from_args;
pub mod help;
mod impls;
pub mod parameter;
pub mod state;
pub mod util;
#[cfg(feature = "std")]
pub mod arguments;
#[cfg(feature = "std")]
mod printers;
pub use debate_derive::{FromArgs, ParameterUsage, Usage, Value, main};
pub use debate_parser::Arg;
#[derive(Debug, Clone, Copy)]
pub enum Tags<'a> {
Long { long: &'a str },
Short { short: char },
LongShort { long: &'a str, short: char },
}
impl<'a> Tags<'a> {
#[inline]
#[must_use]
pub const fn long(&self) -> Option<&'a str> {
match self {
Tags::Long { long } | Tags::LongShort { long, .. } => Some(long),
Tags::Short { .. } => None,
}
}
#[inline]
#[must_use]
pub const fn short(&self) -> Option<char> {
match self {
Tags::Short { short } | Tags::LongShort { short, .. } => Some(*short),
Tags::Long { .. } => None,
}
}
}