summaryrefslogtreecommitdiff
path: root/rust/src
diff options
context:
space:
mode:
authornil0j <nil.jimeno@estudiant.fjaverianas.com>2024-09-21 10:17:23 +0200
committernil0j <nil.jimeno@estudiant.fjaverianas.com>2024-09-21 10:17:23 +0200
commitfaa13839f898c60ff5618be6e916ad2e60958468 (patch)
treed785b9e7c66d092c0e5fbc296382289f39fea501 /rust/src
init
Diffstat (limited to 'rust/src')
-rw-r--r--rust/src/main.rs5
-rw-r--r--rust/src/structs.rs35
2 files changed, 40 insertions, 0 deletions
diff --git a/rust/src/main.rs b/rust/src/main.rs
new file mode 100644
index 0000000..486aa6f
--- /dev/null
+++ b/rust/src/main.rs
@@ -0,0 +1,5 @@
+mod structs;
+
+fn main() {
+ println!("Hello, world!");
+}
diff --git a/rust/src/structs.rs b/rust/src/structs.rs
new file mode 100644
index 0000000..7535bb4
--- /dev/null
+++ b/rust/src/structs.rs
@@ -0,0 +1,35 @@
+#[allow(dead_code)]
+struct Song {
+ //song variables
+ id: i32,
+ title: String,
+ lyrics: String,
+
+ //album variables
+ album_id: i32,
+ genres: Vec<String>,
+ album_cover: String,
+
+ //artist variables
+ artist_id: i32,
+ artist_name: String,
+}
+
+#[allow(dead_code)]
+struct Album {
+ id: i32,
+ title: String,
+ genres: Vec<String>,
+ cover: String,
+ songs: Vec<i32>,
+}
+
+#[allow(dead_code)]
+struct Artist {
+ id: i32,
+ name: String,
+ genres: Vec<String>,
+ albums: Vec<i32>,
+}
+
+// lepht anonym