Skip to main content

CliPartsFor

Trait CliPartsFor 

Source
pub trait CliPartsFor<Stated> {
    const PARTS: &'static [&'static str];
    const PART: &'static str;
    const WHOLE: &'static str;
}
Expand description

Names the parts a compound source supplies an argument’s parts to, as the argument’s type names them: a product’s fields or a sum’s alternatives; none for an argument the context decides.

Required Associated Constants§

Source

const PARTS: &'static [&'static str]

The argument’s part names, in order.

Source

const PART: &'static str

What one part is called: field or alternative.

Source

const WHOLE: &'static str

What the whole is called: product or sum.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<Alternatives, Value> CliPartsFor<StatedArg<Option<Value>>> for SumSource<Alternatives, Optional>
where Value: Sum,

Source§

const PARTS: &'static [&'static str] = Value::ALTERNATIVES

Source§

const PART: &'static str = "alternative"

Source§

const WHOLE: &'static str = "sum"

Source§

impl<Alternatives, Value> CliPartsFor<StatedArg<Value>> for SumSource<Alternatives, Whole>
where Value: Sum,

Source§

const PARTS: &'static [&'static str] = Value::ALTERNATIVES

Source§

const PART: &'static str = "alternative"

Source§

const WHOLE: &'static str = "sum"

Source§

impl<Fields, Value> CliPartsFor<StatedArg<Option<Value>>> for ProductSource<Fields, Optional>
where Value: Product,

Source§

const PARTS: &'static [&'static str] = Value::FIELDS

Source§

const PART: &'static str = "field"

Source§

const WHOLE: &'static str = "product"

Source§

impl<Fields, Value> CliPartsFor<StatedArg<Value>> for ProductSource<Fields, Whole>
where Value: Product,

Source§

const PARTS: &'static [&'static str] = Value::FIELDS

Source§

const PART: &'static str = "field"

Source§

const WHOLE: &'static str = "product"

Source§

impl<Source> CliPartsFor<ContextArg> for Source

Source§

const PARTS: &'static [&'static str]

Source§

const PART: &'static str = "part"

Source§

const WHOLE: &'static str = "argument"