cmd_args/arg/
arg_type.rs

1use std::fmt;
2
3/// Possible argument types.
4pub enum Type {
5    Bool,
6    Str,
7    Int,
8    Float,
9}
10
11impl fmt::Display for Type {
12    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
13        write!(f, "{}", match self {
14            Type::Bool => "boolean",
15            Type::Str => "string",
16            Type::Int => "integer",
17            Type::Float => "float",
18        })
19    }
20}