From a65c7993d55a3272744222f895ebfc4e0ea46732 Mon Sep 17 00:00:00 2001 From: Ethan Girouard Date: Mon, 1 Jan 2024 15:08:13 -0500 Subject: [PATCH] Add SongData struct --- src/lib.rs | 1 + src/songdata.rs | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 src/songdata.rs diff --git a/src/lib.rs b/src/lib.rs index 41a6393..4f5dee0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,5 @@ pub mod app; +pub mod songdata; use cfg_if::cfg_if; cfg_if! { diff --git a/src/songdata.rs b/src/songdata.rs new file mode 100644 index 0000000..c24c682 --- /dev/null +++ b/src/songdata.rs @@ -0,0 +1,16 @@ +/// Holds information about a song +#[derive(Debug)] +pub struct SongData { + /// Song name + pub name: String, + /// Song artist + pub artist: String, + /// Song album + pub album: String, + /// Path to song file, relative to the root of the web server. + /// For example, `"/assets/audio/Song.mp3"` + pub song_path: String, + /// Path to song image, relative to the root of the web server. + /// For example, `"/assets/images/Song.jpg"` + pub image_path: String, +}