jtd_derive/
names.rs

1/// How to refer to a given schema. Used mostly for referring to a schema definition
2/// using the ["ref" form](https://jsontypedef.com/docs/jtd-in-5-minutes/#ref-schemas).
3///
4/// The [`Generator`](crate::gen::Generator) decides how to use this information to
5/// generate an actual identifier.
6#[derive(Debug, PartialEq, Eq, Clone, Hash)]
7pub struct Names {
8    /// The short name. Most of the time this is just the ident of the Rust type.
9    pub short: &'static str,
10    /// The long name. Most of the time this is the full path of the Rust type, starting
11    /// with the crate name.
12    pub long: &'static str,
13    /// Nullability.
14    pub nullable: bool,
15    /// Names of any type arguments applied to the generic Rust type.
16    pub type_params: Vec<Names>,
17    /// The values of constant arguments represented as strings.
18    pub const_params: Vec<String>,
19}