我可以有如下结构:
struct Example {
    state: State,
    properties: HashMap<String, String>,
}
enum State {
    a, b, c,
}
如果示例结构是 State 枚举的唯一用户,我认为在结构中声明它是有意义的:
struct Example {
    state: enum { a, b, c },
    properties: HashMap<String, String>,
}
有没有有效的语法?