Commit Graph

  • 45cad795a7 Use enums master Stephan Rehfeld 2026-04-29 18:40:36 +02:00
  • 5daaf9e1bc Iterating over collection using match Stephan Rehfeld 2026-04-29 18:31:53 +02:00
  • bb45906753 Important Rust Pattern: Inheritance does not exist, use enum to store multiple different types in same Collection Stephan Rehfeld 2026-04-29 18:28:57 +02:00
  • b7a1f52360 Putting some Sphere into a Vec Stephan Rehfeld 2026-04-29 18:19:56 +02:00
  • b1963c7e6a Adding some Geometries Stephan Rehfeld 2026-04-29 18:14:00 +02:00
  • 9ef8e08936 Impl Trait add for Point ad Vector3 Stephan Rehfeld 2026-04-29 18:08:30 +02:00
  • 31e224f9b0 Implementing Div Trait Stephan Rehfeld 2026-04-29 18:02:48 +02:00
  • 07b2fc28d8 Implemting multiplication of vector3 with scalar Stephan Rehfeld 2026-04-29 17:53:40 +02:00
  • 31c9bda5a2 Implementing Sub for our Vector Stephan Rehfeld 2026-04-29 17:49:48 +02:00
  • 794228dfce Implementing Add for our Vector3 Stephan Rehfeld 2026-04-29 17:47:42 +02:00
  • 28df45da67 Minimal example to show implementation of traits Stephan Rehfeld 2026-04-29 17:38:52 +02:00
  • 81205e5b29 Example with ownership Stephan Rehfeld 2026-04-29 17:35:33 +02:00
  • 07d7855f47 CODE DOES NOT Compile You can't trick the borrow checker, by putting references into another struct Stephan Rehfeld 2026-04-22 18:36:00 +02:00
  • 352085f8d9 We need lifitime annotation, when struct wants to old a reference. Stephan Rehfeld 2026-04-22 18:25:24 +02:00
  • b0e998fb28 Either on mutable borrow or inifite immutable borrows are allowed Stephan Rehfeld 2026-04-22 18:12:55 +02:00
  • 7a1b0975d2 Example with references and mutable references Stephan Rehfeld 2026-04-22 17:59:39 +02:00
  • 12a54c42da Image example to show Ownership Stephan Rehfeld 2026-04-15 18:58:16 +02:00
  • bd260f1769 Drop and move behavior Stephan Rehfeld 2026-04-15 18:04:15 +02:00
  • 823ec0ad00 Move is the default in Rust Stephan Rehfeld 2026-04-08 19:03:40 +02:00
  • 019fbcf095 use unwrap_or to get default value Stephan Rehfeld 2026-04-08 18:46:40 +02:00
  • 20c675ef91 You can use unwrap to get value. Panics, if result is Err Stephan Rehfeld 2026-04-08 18:43:12 +02:00
  • 6e0e031b12 Optional and Result for optional parameters and functions that may fail. Stephan Rehfeld 2026-04-08 18:41:31 +02:00
  • d5427c96ca Enum values can contain futher values. Use pattern matching to access. Stephan Rehfeld 2026-04-08 18:19:44 +02:00
  • 092e5693b7 Simple enum with match Stephan Rehfeld 2026-04-08 18:16:15 +02:00
  • 04520ffa1e Ranges can be reversed Stephan Rehfeld 2026-04-08 18:05:35 +02:00
  • c77982c642 Range syntax Stephan Rehfeld 2026-04-08 18:05:06 +02:00
  • 97e5c2fd72 For loop over array Stephan Rehfeld 2026-04-08 18:03:28 +02:00
  • 6316eb4e02 Loops can returns values Stephan Rehfeld 2026-04-08 17:54:28 +02:00
  • c6bba1c4a7 Loop loop Stephan Rehfeld 2026-04-08 17:46:17 +02:00
  • cbc1663ad2 While loop Stephan Rehfeld 2026-04-08 17:43:28 +02:00
  • 72541ec0a1 If can return values Stephan Rehfeld 2026-04-08 17:41:15 +02:00
  • 8779759e7a Simple if condifition Stephan Rehfeld 2026-04-08 17:38:35 +02:00
  • f899a55a08 Our code so far. Stephan Rehfeld 2026-04-08 17:28:43 +02:00