danceinterpreter_rs/dataloading/
songinfo.rs1use iced::widget::image;
2
3#[derive(Default, Clone, Debug, PartialEq)]
4pub struct SongInfo {
5 pub track_number: u32,
6 pub title: String,
7 pub artist: String,
8 pub dance: String,
9 pub album_art: Option<image::Handle>,
10}
11
12impl SongInfo {
13 pub fn with_dance(dance: String) -> Self {
14 SongInfo {
15 dance,
16 ..Default::default()
17 }
18 }
19
20 pub fn new(
21 track_number: u32,
22 title: String,
23 artist: String,
24 dance: String,
25 album_art: Option<image::Handle>,
26 ) -> Self {
27 SongInfo {
28 track_number,
29 title,
30 artist,
31 dance,
32 album_art,
33 }
34 }
35}