-#[derive(Debug, RustcEncodable)]
-struct Def {
- kind: DefKind,
- id: Id,
- span: SpanData,
- name: String,
- qualname: String,
- value: String,
- children: Vec<Id>,
- decl_id: Option<Id>,
- docs: String,
- sig: Option<JsonSignature>,
- attributes: Vec<Attribute>,
-}
-
-#[derive(Debug, RustcEncodable)]
-enum DefKind {
- // value = variant names
- Enum,
- // value = enum name + variant name + types
- Tuple,
- // value = [enum name +] name + fields
- Struct,
- // value = signature
- Trait,
- // value = type + generics
- Function,
- // value = type + generics
- Method,
- // No id, no value.
- Macro,
- // value = file_name
- Mod,
- // value = aliased type
- Type,
- // value = type and init expression (for all variable kinds).
- Local,
- Static,
- Const,
- Field,
-}
-
-impl From<EnumData> for Def {
- fn from(data: EnumData) -> Def {