[][src]Module show_notes::e023

Traits Deep Dive, Part 1

Show Notes

Traits—

Also of interest: specialization:

Sponsors

(Thanks to the couple people donating who opted out of the reward tier, as well. You know who you are!)

Become a sponsor

Contact

Structs

Script

e023: Traits Deep Dive, Part I

Enums

Breakfast

Breakfast is eatable, so Breakfast is Eatable!

MoarBreakfast

Moar Breakfast is even better, so MoarBreakfast is also Eatable and Nomable!

Traits

Eatable

A trait, to be implemented by types like Breakfast.

Nomable

Just another way to eat things – exists to show conflicting trait methods.

Functions

demo_eatable

Shows how you can use traits with your own and others' types.