blarg_builder 1.0.0

A type-safe, domain sensitive, argument/option paradigm command line parser.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Traits which, typically, may be imported without concern: `use blarg::prelude::*`.

/// Behaviour for multiple (0 to many) items `T` to be collected together.
///
/// Must be imported in order to implement a custom `Collectable`.
pub trait Collectable<T> {
    /// Add a value to this `Collectable`.
    fn add(&mut self, item: T);
}

/// Behaviour for documenting choices on a [`Parameter`](../struct.Parameter.html) or [`Condition`](../struct.Condition.html).
///
/// Must be imported in order to document choices.
pub trait Choices<T> {
    fn choice(self, variant: T, description: impl Into<String>) -> Self;
}