1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use crate::*;

#[derive(Clone, Debug)]
pub struct Variant {
    /// Identifier of the variant; it includes `#[serde(rename)]` and similar
    /// attributes, so this string is exactly what gets serialized into the
    /// output.
    pub id: &'static str,

    /// Title of the variant as it was written in the Rust code, excluding
    /// stuff like `#[serde(rename)]`.
    pub title: &'static str,

    pub comment: Option<&'static str>,
    pub serializable: bool,
    pub deserializable: bool,
    pub fields: Fields,
    pub aliases: &'static [&'static str],
}