mir/
parameter.rs

1use std::fmt::Formatter;
2
3/// Specifically represents a parameter in Location::Query. We need special treatment for repeated keys.
4pub enum ParamKey {
5    Key(String),
6    RepeatedKey(String),
7}
8
9impl std::fmt::Display for ParamKey {
10    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
11        match self {
12            ParamKey::Key(s) => write!(f, "\"{}\"", s),
13            ParamKey::RepeatedKey(s) => write!(f, "\"{}[]\"", s),
14        }
15    }
16}