5cc0b49cd9eb81d8d28d4ecb2c598adf348fa417
I get lazy with commits when following guided material. There's a design challenge to approach, now. I'm saving here so I can revert changes in case it goes sideways. Materials are proving to be a little complicated in Rust semantics. The Ray Tracing in a Weekend book uses shared_ptr's, but Rust doesn't really like that. I'm doing references with lifetime annotations. Hopefully I can get that the right way around to work out. The materials themselves look like reasonable candidates for describing as Enums. This takes away the ability to add new ones by simply impl'ing a trait, but that was never gonna happen anyway. The code would be modified and recompiled. There's no difference in maintenance cost if that's a new struct impl'ing a trait, or adding enum members.
Description
Languages
Rust
100%