pub struct Count {
pub count: u32,
}Expand description
A switch parameter that counts the number of times it appears on the command
line. Enables things like increasing verbosity levels via -v, -vv,
-vvv
Fields§
§count: u32The number of times this switch appeared
Trait Implementations§
Source§impl Ord for Count
impl Ord for Count
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'arg> Parameter<'arg> for Count
impl<'arg> Parameter<'arg> for Count
Source§fn absent() -> Result<Self, RequiredError>
fn absent() -> Result<Self, RequiredError>
This parameter was absent from the command line. Read more
Source§fn present<E: Error<'arg>>(_arg: impl ArgAccess<'arg>) -> Result<Self, E>
fn present<E: Error<'arg>>(_arg: impl ArgAccess<'arg>) -> Result<Self, E>
This parameter appeared on the command line. Read more
Source§fn add_present<E: Error<'arg>>(
&mut self,
_arg: impl ArgAccess<'arg>,
) -> Result<(), E>
fn add_present<E: Error<'arg>>( &mut self, _arg: impl ArgAccess<'arg>, ) -> Result<(), E>
This parameter appeared more than once on the command line. Read more
Source§impl ParameterUsage for Count
impl ParameterUsage for Count
Source§const VALUE: ParameterValueKind = help::ParameterValueKind::Flag
const VALUE: ParameterValueKind = help::ParameterValueKind::Flag
The nature of the value this takes as an argument, if any.
Source§const REQUIREMENT: Requirement = help::Requirement::Optional
const REQUIREMENT: Requirement = help::Requirement::Optional
Whether or not this parameter must appear at least once.
Source§const REPETITION: Repetition = help::Repetition::Multiple
const REPETITION: Repetition = help::Repetition::Multiple
Whether or not this parameter may appear more than once.
Source§impl PartialOrd for Count
impl PartialOrd for Count
impl Copy for Count
impl Eq for Count
impl StructuralPartialEq for Count
Auto Trait Implementations§
impl Freeze for Count
impl RefUnwindSafe for Count
impl Send for Count
impl Sync for Count
impl Unpin for Count
impl UnsafeUnpin for Count
impl UnwindSafe for Count
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more