Advanced Traits

Associated Types

More common than the other things, less common than the rest of the book

why this is a thing instead of a generic

The Thing Formerly Known as UFCS

Only needed when implementing super generic code

Lots of things are syntax sugar for this

Two traits that impl the same method - how to disambiguate

Coherence

Show examples of when you control traits and types or not

Ex: Cannot impl Debug on someone else's type

Solution: newtype

results matching ""

    No results matching ""