Zoos Rust Club [Episode 5] - Operators and Traits @zoodotdev
Zoos Rust Club [Episode 5] - Operators and Traits  @zoodotdev
Uploaded February 2024 | Updated September 2026, 1 week ago
Welcome back to Zoo's Rust Club!

*What's in store for you:*
πŸ”· Learn how to define your types and use them with Rust's built-in mathematical operators like + or -
πŸ”· Discover the trait system that makes this operator overloading possible
πŸ”· Explore advanced features of traits, like "associated types"

BUT If you haven't seen our first Rust Club video, check it out here ➑️ youtube.com/watch?v=QF3kMyzMC40

---------------------------------------------------------------------------------------

Timestamps

00:00 Intro
00:52 Making a generic "midpoint" function
04:28 Implementing the Add trait
09:20 The "Output" associated type
11:40 Implementing the Index trait
16:40 IndexMut and supertraits
19:35 Constraining generics with "where"
20:25 What if two different traits use the same method name?
28:45 Implementing IndexMut
30:50 Using enums as indices
34:05 Impling Index twice on the same type
35:37 What traits does this type implement?



---------------------------------------------------------------------------------------

β‡Š Check us out below β‡Š
Website: https://zoo.dev
Github: github.com/KittyCAD
LinkedIn: linkedin.com/company/zoodotdev
Twitter: twitter.com/zoodotdev
Discord: discord.com/invite/JQEpHR7Nt2

---------------------------------------------------------------------------------------

*Zoo* creates infrastructure for hardware design. Design demands have outpaced today’s hardware design infrastructure, and the industry is due for a refresh. We're laying the foundation for a modern hardware design toolkit, so that you can create new design tools never before possible.

#hardware #software #Zoo
Zoos Rust Club [Episode 5] - Operators and TraitsUI Overview in Zoo Design StudioChick-Approved!KCL: Sketches, lines and curvesCreate with hybrid workflowConstruction Geometry: Offset Plane & Helix in Zoo Design StudioPatterns: Linear & Circular Pattern in Zoo Design StudioZoo Design Studio: Account Setup & Settings GuideSaving & Restoring DesignsNerds on Patrol [Episode 2] - LaunchpadHow Conversations Work in ZookeeperZookeeper Interface Walkthrough
Zoo |

Zoo's Rust Club [Episode 5] - Operators and Traits

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER