pub trait CliSourceFor<Argument> {
// Required method
fn cli_describe(
&self,
name: &'static str,
positions: &mut usize,
out: &mut Vec<ArgumentInfo>,
);
}Expand description
States that a source can supply an argument of type Argument.
A named source supplies any argument. A positional source supplies a value, an optional
value, or many values, but not a switch, because a switch is only its spelling. For the same
reason a switch has no fallback. A product source supplies a Product, and a sum source a Sum.
Required Methods§
Sourcefn cli_describe(
&self,
name: &'static str,
positions: &mut usize,
out: &mut Vec<ArgumentInfo>,
)
fn cli_describe( &self, name: &'static str, positions: &mut usize, out: &mut Vec<ArgumentInfo>, )
Describes this source for the argument name into out, counting positional sources in
positions. A compound source describes one argument per part.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl CliSourceFor<()> for NamedSource<NoFallback, Switch>
An alternative of a sum carrying no value: given by its spelling alone.
impl CliSourceFor<bool> for NamedSource<NoFallback, Switch>
impl CliSourceFor<bool> for NamedSource<WithEnv, Switch>
impl<Mode, Value, Spelling: CliSpelling> CliSourceFor<Option<Value>> for NamedSource<Mode, Optional, Spelling>
impl<Mode, Value, Spelling: CliSpelling> CliSourceFor<Value> for NamedSource<Mode, Whole, Spelling>
impl<Mode, Value, Spelling: CliSpelling> CliSourceFor<Vec<Value>> for DelimitedSource<Mode, Spelling>
impl<Mode, Value, Spelling: CliSpelling> CliSourceFor<Vec<Value>> for NamedSource<Mode, Many, Spelling>
impl<Mode, Value> CliSourceFor<Option<Value>> for PositionalSource<Mode, Optional>
impl<Mode, Value> CliSourceFor<Value> for PositionalSource<Mode, Whole>
impl<Mode, Value> CliSourceFor<Vec<Value>> for PositionalSource<Mode, Many>
impl<Value, Fields> CliSourceFor<Option<Value>> for ProductSource<Fields, Optional>
impl<Value, Fields> CliSourceFor<Value> for ProductSource<Fields, Whole>
impl<Value, S0, A0, S1, A1, S2, A2, S3, A3, S4, A4, S5, A5, S6, A6, S7, A7, S8, A8, S9, A9, S10, A10, S11, A11, S12, A12, S13, A13, S14, A14, S15, A15> CliSourceFor<Option<Value>> for SumSource<(((((((((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9), S10), S11), S12), S13), S14), S15), Optional>where
Value: Sum<Alternatives = Sum16<A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15>>,
(((((((((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9), S10), S11), S12), S13), S14), S15): CliSources<(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2, S3, A3, S4, A4, S5, A5, S6, A6, S7, A7, S8, A8, S9, A9, S10, A10, S11, A11, S12, A12, S13, A13, S14, A14, S15, A15> CliSourceFor<Value> for SumSource<(((((((((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9), S10), S11), S12), S13), S14), S15), Whole>where
Value: Sum<Alternatives = Sum16<A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15>>,
(((((((((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9), S10), S11), S12), S13), S14), S15): CliSources<(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2, S3, A3, S4, A4, S5, A5, S6, A6, S7, A7, S8, A8, S9, A9, S10, A10, S11, A11, S12, A12, S13, A13, S14, A14> CliSourceFor<Option<Value>> for SumSource<((((((((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9), S10), S11), S12), S13), S14), Optional>where
Value: Sum<Alternatives = Sum15<A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14>>,
((((((((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9), S10), S11), S12), S13), S14): CliSources<(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2, S3, A3, S4, A4, S5, A5, S6, A6, S7, A7, S8, A8, S9, A9, S10, A10, S11, A11, S12, A12, S13, A13, S14, A14> CliSourceFor<Value> for SumSource<((((((((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9), S10), S11), S12), S13), S14), Whole>where
Value: Sum<Alternatives = Sum15<A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14>>,
((((((((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9), S10), S11), S12), S13), S14): CliSources<(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2, S3, A3, S4, A4, S5, A5, S6, A6, S7, A7, S8, A8, S9, A9, S10, A10, S11, A11, S12, A12, S13, A13> CliSourceFor<Option<Value>> for SumSource<(((((((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9), S10), S11), S12), S13), Optional>where
Value: Sum<Alternatives = Sum14<A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13>>,
(((((((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9), S10), S11), S12), S13): CliSources<(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2, S3, A3, S4, A4, S5, A5, S6, A6, S7, A7, S8, A8, S9, A9, S10, A10, S11, A11, S12, A12, S13, A13> CliSourceFor<Value> for SumSource<(((((((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9), S10), S11), S12), S13), Whole>where
Value: Sum<Alternatives = Sum14<A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13>>,
(((((((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9), S10), S11), S12), S13): CliSources<(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2, S3, A3, S4, A4, S5, A5, S6, A6, S7, A7, S8, A8, S9, A9, S10, A10, S11, A11, S12, A12> CliSourceFor<Option<Value>> for SumSource<((((((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9), S10), S11), S12), Optional>where
Value: Sum<Alternatives = Sum13<A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12>>,
((((((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9), S10), S11), S12): CliSources<(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2, S3, A3, S4, A4, S5, A5, S6, A6, S7, A7, S8, A8, S9, A9, S10, A10, S11, A11, S12, A12> CliSourceFor<Value> for SumSource<((((((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9), S10), S11), S12), Whole>where
Value: Sum<Alternatives = Sum13<A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12>>,
((((((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9), S10), S11), S12): CliSources<(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2, S3, A3, S4, A4, S5, A5, S6, A6, S7, A7, S8, A8, S9, A9, S10, A10, S11, A11> CliSourceFor<Option<Value>> for SumSource<(((((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9), S10), S11), Optional>where
Value: Sum<Alternatives = Sum12<A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>>,
(((((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9), S10), S11): CliSources<(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2, S3, A3, S4, A4, S5, A5, S6, A6, S7, A7, S8, A8, S9, A9, S10, A10, S11, A11> CliSourceFor<Value> for SumSource<(((((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9), S10), S11), Whole>where
Value: Sum<Alternatives = Sum12<A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>>,
(((((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9), S10), S11): CliSources<(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2, S3, A3, S4, A4, S5, A5, S6, A6, S7, A7, S8, A8, S9, A9, S10, A10> CliSourceFor<Option<Value>> for SumSource<((((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9), S10), Optional>where
Value: Sum<Alternatives = Sum11<A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>>,
((((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9), S10): CliSources<(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2, S3, A3, S4, A4, S5, A5, S6, A6, S7, A7, S8, A8, S9, A9, S10, A10> CliSourceFor<Value> for SumSource<((((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9), S10), Whole>where
Value: Sum<Alternatives = Sum11<A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>>,
((((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9), S10): CliSources<(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2, S3, A3, S4, A4, S5, A5, S6, A6, S7, A7, S8, A8, S9, A9> CliSourceFor<Option<Value>> for SumSource<(((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9), Optional>where
Value: Sum<Alternatives = Sum10<A0, A1, A2, A3, A4, A5, A6, A7, A8, A9>>,
(((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9): CliSources<(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2, S3, A3, S4, A4, S5, A5, S6, A6, S7, A7, S8, A8, S9, A9> CliSourceFor<Value> for SumSource<(((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9), Whole>where
Value: Sum<Alternatives = Sum10<A0, A1, A2, A3, A4, A5, A6, A7, A8, A9>>,
(((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), S9): CliSources<(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2, S3, A3, S4, A4, S5, A5, S6, A6, S7, A7, S8, A8> CliSourceFor<Option<Value>> for SumSource<((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), Optional>where
Value: Sum<Alternatives = Sum9<A0, A1, A2, A3, A4, A5, A6, A7, A8>>,
((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8): CliSources<(A0, A1, A2, A3, A4, A5, A6, A7, A8)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2, S3, A3, S4, A4, S5, A5, S6, A6, S7, A7, S8, A8> CliSourceFor<Value> for SumSource<((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8), Whole>where
Value: Sum<Alternatives = Sum9<A0, A1, A2, A3, A4, A5, A6, A7, A8>>,
((((((((((), S0), S1), S2), S3), S4), S5), S6), S7), S8): CliSources<(A0, A1, A2, A3, A4, A5, A6, A7, A8)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2, S3, A3, S4, A4, S5, A5, S6, A6, S7, A7> CliSourceFor<Option<Value>> for SumSource<(((((((((), S0), S1), S2), S3), S4), S5), S6), S7), Optional>where
Value: Sum<Alternatives = Sum8<A0, A1, A2, A3, A4, A5, A6, A7>>,
(((((((((), S0), S1), S2), S3), S4), S5), S6), S7): CliSources<(A0, A1, A2, A3, A4, A5, A6, A7)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2, S3, A3, S4, A4, S5, A5, S6, A6, S7, A7> CliSourceFor<Value> for SumSource<(((((((((), S0), S1), S2), S3), S4), S5), S6), S7), Whole>where
Value: Sum<Alternatives = Sum8<A0, A1, A2, A3, A4, A5, A6, A7>>,
(((((((((), S0), S1), S2), S3), S4), S5), S6), S7): CliSources<(A0, A1, A2, A3, A4, A5, A6, A7)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2, S3, A3, S4, A4, S5, A5, S6, A6> CliSourceFor<Option<Value>> for SumSource<((((((((), S0), S1), S2), S3), S4), S5), S6), Optional>where
Value: Sum<Alternatives = Sum7<A0, A1, A2, A3, A4, A5, A6>>,
((((((((), S0), S1), S2), S3), S4), S5), S6): CliSources<(A0, A1, A2, A3, A4, A5, A6)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2, S3, A3, S4, A4, S5, A5, S6, A6> CliSourceFor<Value> for SumSource<((((((((), S0), S1), S2), S3), S4), S5), S6), Whole>where
Value: Sum<Alternatives = Sum7<A0, A1, A2, A3, A4, A5, A6>>,
((((((((), S0), S1), S2), S3), S4), S5), S6): CliSources<(A0, A1, A2, A3, A4, A5, A6)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2, S3, A3, S4, A4, S5, A5> CliSourceFor<Option<Value>> for SumSource<(((((((), S0), S1), S2), S3), S4), S5), Optional>where
Value: Sum<Alternatives = Sum6<A0, A1, A2, A3, A4, A5>>,
(((((((), S0), S1), S2), S3), S4), S5): CliSources<(A0, A1, A2, A3, A4, A5)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2, S3, A3, S4, A4, S5, A5> CliSourceFor<Value> for SumSource<(((((((), S0), S1), S2), S3), S4), S5), Whole>where
Value: Sum<Alternatives = Sum6<A0, A1, A2, A3, A4, A5>>,
(((((((), S0), S1), S2), S3), S4), S5): CliSources<(A0, A1, A2, A3, A4, A5)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2, S3, A3, S4, A4> CliSourceFor<Option<Value>> for SumSource<((((((), S0), S1), S2), S3), S4), Optional>where
Value: Sum<Alternatives = Sum5<A0, A1, A2, A3, A4>>,
((((((), S0), S1), S2), S3), S4): CliSources<(A0, A1, A2, A3, A4)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2, S3, A3, S4, A4> CliSourceFor<Value> for SumSource<((((((), S0), S1), S2), S3), S4), Whole>where
Value: Sum<Alternatives = Sum5<A0, A1, A2, A3, A4>>,
((((((), S0), S1), S2), S3), S4): CliSources<(A0, A1, A2, A3, A4)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2, S3, A3> CliSourceFor<Option<Value>> for SumSource<(((((), S0), S1), S2), S3), Optional>where
Value: Sum<Alternatives = Sum4<A0, A1, A2, A3>>,
(((((), S0), S1), S2), S3): CliSources<(A0, A1, A2, A3)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2, S3, A3> CliSourceFor<Value> for SumSource<(((((), S0), S1), S2), S3), Whole>where
Value: Sum<Alternatives = Sum4<A0, A1, A2, A3>>,
(((((), S0), S1), S2), S3): CliSources<(A0, A1, A2, A3)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2> CliSourceFor<Option<Value>> for SumSource<((((), S0), S1), S2), Optional>where
Value: Sum<Alternatives = Sum3<A0, A1, A2>>,
((((), S0), S1), S2): CliSources<(A0, A1, A2)> + CliNamedSources,
impl<Value, S0, A0, S1, A1, S2, A2> CliSourceFor<Value> for SumSource<((((), S0), S1), S2), Whole>where
Value: Sum<Alternatives = Sum3<A0, A1, A2>>,
((((), S0), S1), S2): CliSources<(A0, A1, A2)> + CliNamedSources,
impl<Value, S0, A0, S1, A1> CliSourceFor<Option<Value>> for SumSource<(((), S0), S1), Optional>where
Value: Sum<Alternatives = Sum2<A0, A1>>,
(((), S0), S1): CliSources<(A0, A1)> + CliNamedSources,
impl<Value, S0, A0, S1, A1> CliSourceFor<Value> for SumSource<(((), S0), S1), Whole>where
Value: Sum<Alternatives = Sum2<A0, A1>>,
(((), S0), S1): CliSources<(A0, A1)> + CliNamedSources,
impl<Value> CliSourceFor<Option<Option<Value>>> for NamedSource<NoFallback, OptionalValue>
An option with a value written only in its own word: absent, given bare, which an interpreter answers as an empty word, or given a value.