serde_json::from_str(&json_content)?; rustdoc-types 側は serde derive 付きの型定義を提供しているだけ pub struct Crate { pub index: HashMap<Id, Item>, // すべてのアイテム pub paths: HashMap<Id, ItemSummary>, // 他クレートの型解決用 pub format_version: u32, /* ... */ } pub enum Type { Primitive(String), // i32 / bool / char / ... Tuple(Vec<Type>), // () / (T, U) / ... BorrowedRef { /* .. */ }, // &T / &mut T ResolvedPath(Path), // 任意の名前付き型 /* ... */ } 8