Type-Driven API Design in Rust
summary
Live-coding builds a working Rust progress-bar API that compiles and runs, not just slides: it reimplements a tqdm-like wrapper, uses extension traits to add methods to external iterator types, and encodes states as types with type-state so calling with_bound is only possible for exact_size_iterators. The talk shows concrete code, the actual trait bounds and where-clauses used, the compiler errors that prevent misuses, and a runnable prototype demonstrating bounded vs unbounded behavior.
AI-written summary · about
chapters (7)
- 0:00Start
- 7:26Progress Bar
- 11:58Traits
- 12:14Iterator Trait
- 18:32Display the State of the Iterator
- 31:30Customize the Delimiters
- 33:38Type State
related talks
38mType-level interfaces in Haskell & Rust: pragmatic type-level programming
25m"Compiler-Driven Development: Making Rust Work for You"
31mThe Rust That Could Have Been
33mRust and Haskell, sitting in a tree
23mEvolving API design in Rust
44mTyped Design Patterns for the Functional Era
31mFrom C++ APIs to Idiomatic Rust: Wrapper Design Patterns
19mType Theory for the Working Rustacean
