initial commit

This commit is contained in:
Zacharias-Brohn
2026-07-12 23:39:38 +02:00
commit c756b14e24
219 changed files with 5438 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
#[derive(Debug)]
struct Point {
x: u64,
y: u64,
}
#[derive(Debug)]
enum Message {
// TODO: Define the different variants used below.
Resize { width: i32, height: i32 },
Move(Point),
Echo(String),
ChangeColor(i32, i32, i32),
Quit,
}
impl Message {
fn call(&self) {
println!("{self:?}");
}
}
fn main() {
let messages = [
Message::Resize {
width: 10,
height: 30,
},
Message::Move(Point { x: 10, y: 15 }),
Message::Echo(String::from("hello world")),
Message::ChangeColor(200, 255, 255),
Message::Quit,
];
for message in &messages {
message.call();
}
}