ktav 0.3.1

Ktav — a plain configuration format. Three rules, zero indentation, zero quoting. Serde-native.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Which kind of bracket we expect to close.

#[derive(Copy, Clone)]
pub(super) enum Bracket {
    Object,
    Array,
}

impl Bracket {
    pub(super) fn close(self) -> char {
        match self {
            Bracket::Object => '}',
            Bracket::Array => ']',
        }
    }
}