From f4fce844cac9bdd5a9a648d4fc156227c3569175 Mon Sep 17 00:00:00 2001 From: Bauke Date: Mon, 16 Jan 2023 21:31:13 +0100 Subject: [PATCH] Add doc comments to video structs. --- source/video/mod.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/source/video/mod.rs b/source/video/mod.rs index 346dad0..0584aa4 100644 --- a/source/video/mod.rs +++ b/source/video/mod.rs @@ -11,26 +11,47 @@ mod filters; #[derive(Debug, Template)] #[template(path = "video.html")] pub struct VideoTemplate { + /// The title of the page. pub page_title: String, + + /// Markdown rendered by [`comrak`]. pub rendered_markdown: String, + + /// Data for a speedrun video. pub speedrun: Option, + + /// The YouTube video ID. pub video_id: String, } #[derive(Debug, Deserialize)] pub struct VideoData { + /// The YouTube video ID. pub id: String, + + /// The title of the page. pub page_title: String, + + /// Data for a speedrun video. pub speedrun: Option, + + /// Tags for the video. #[serde(default)] pub tags: Vec, } #[derive(Debug, Deserialize)] pub struct SpeedrunData { + /// Video chapters as with timestamps and chapter titles. pub chapters: Option>, + + /// A link to the entry for this specific speedrun. pub entry: String, + + /// A link to the leaderboard for this speedrun's category. pub leaderboard: String, + + /// Deep Rock Galactic mods used in the run. pub mods: Option>, }