Add SongData struct
This commit is contained in:
parent
ddec845eb0
commit
a65c7993d5
@ -1,4 +1,5 @@
|
|||||||
pub mod app;
|
pub mod app;
|
||||||
|
pub mod songdata;
|
||||||
use cfg_if::cfg_if;
|
use cfg_if::cfg_if;
|
||||||
|
|
||||||
cfg_if! {
|
cfg_if! {
|
||||||
|
16
src/songdata.rs
Normal file
16
src/songdata.rs
Normal file
@ -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,
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user