diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-07-17 04:04:11 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-07-17 04:04:11 +0800 |
| commit | dc9d5ea0026a6cb6bb477d5db8e9190a79ecb337 (patch) | |
| tree | fffa1630946e8299e25f805955cc3baa0479be0d /mingling/src/parser/picker | |
| parent | b9f208deed7b8e012fbcd84202e2fb1d5eb8eeb9 (diff) | |
docs: add module-level documentation and improve doc comments
Diffstat (limited to 'mingling/src/parser/picker')
| -rw-r--r-- | mingling/src/parser/picker/bools.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mingling/src/parser/picker/bools.rs b/mingling/src/parser/picker/bools.rs index ede8812..0525c52 100644 --- a/mingling/src/parser/picker/bools.rs +++ b/mingling/src/parser/picker/bools.rs @@ -1,9 +1,15 @@ use crate::parser::Pickable; +/// Represents a boolean-like value with `Yes` and `No` variants. +/// +/// `Yes` can be parsed from command-line arguments using positive keywords such as `"y"` or `"yes"`, +/// and defaults to `No`. #[derive(Debug, Default)] #[repr(u8)] pub enum Yes { + /// The affirmative/positive variant. Yes, + /// The negative/default variant. #[default] No, } @@ -57,10 +63,16 @@ impl Pickable for Yes { } } +/// Represents a boolean-like value with `True` and `False` variants. +/// +/// `True` can be parsed from command-line arguments using positive keywords such as `"t"` or `"true"`, +/// and defaults to `False`. #[derive(Debug, Default)] #[repr(u8)] pub enum True { + /// The affirmative/positive variant. True, + /// The negative/default variant. #[default] False, } |
