pub trait Visitor<'arg> {
type Value;
// Required methods
fn visit_positional(self, argument: &'arg Arg) -> Self::Value;
fn visit_long_argument(
self,
flag: &'arg Arg,
argument: &'arg Arg,
) -> Self::Value;
fn visit_long(
self,
flag: &'arg Arg,
arg: impl ArgAccess<'arg>,
) -> Self::Value;
fn visit_short(self, flag: u8, arg: impl ArgAccess<'arg>) -> Self::Value;
}Expand description
The ArgumentsParser type operates by passing arguments it finds into a
Visitor, to be handled.
Required Associated Types§
Required Methods§
Sourcefn visit_positional(self, argument: &'arg Arg) -> Self::Value
fn visit_positional(self, argument: &'arg Arg) -> Self::Value
A positional parameter.
Sourcefn visit_long_argument(
self,
flag: &'arg Arg,
argument: &'arg Arg,
) -> Self::Value
fn visit_long_argument( self, flag: &'arg Arg, argument: &'arg Arg, ) -> Self::Value
A long flag that definitely has an argument, because it was given
as --flag=argument
Sourcefn visit_long(self, flag: &'arg Arg, arg: impl ArgAccess<'arg>) -> Self::Value
fn visit_long(self, flag: &'arg Arg, arg: impl ArgAccess<'arg>) -> Self::Value
A long flag, such as --flag
Sourcefn visit_short(self, flag: u8, arg: impl ArgAccess<'arg>) -> Self::Value
fn visit_short(self, flag: u8, arg: impl ArgAccess<'arg>) -> Self::Value
A long flag, such as -f
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".