From 434a5bbfce0fca0c365a8f2e063a757a60bd7acd Mon Sep 17 00:00:00 2001 From: Elias Projahn Date: Wed, 13 Jan 2021 16:10:48 +0100 Subject: [PATCH] database: Add more comments to medium --- musicus/src/database/medium.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/musicus/src/database/medium.rs b/musicus/src/database/medium.rs index de0bb38..978975d 100644 --- a/musicus/src/database/medium.rs +++ b/musicus/src/database/medium.rs @@ -10,9 +10,16 @@ use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Debug, Clone)] #[serde(rename_all = "camelCase")] pub struct Medium { + /// An unique ID for the medium. pub id: String, + + /// The human identifier for the medium. pub name: String, + + /// If applicable, the MusicBrainz DiscID. pub discid: Option, + + /// The tracks of the medium, grouped by recording. pub tracks: Vec, } @@ -20,7 +27,10 @@ pub struct Medium { #[derive(Serialize, Deserialize, Debug, Clone)] #[serde(rename_all = "camelCase")] pub struct TrackSet { + /// The recording to which the tracks belong. pub recording: Recording, + + /// The actual tracks. pub tracks: Vec, } @@ -28,7 +38,9 @@ pub struct TrackSet { #[derive(Serialize, Deserialize, Debug, Clone)] #[serde(rename_all = "camelCase")] pub struct Track { - work_parts: Vec, + /// The work parts that are played on this track. They are indices to the + /// work parts of the work that is associated with the recording. + pub work_parts: Vec, } /// Table data for a [`Medium`].