~/talk

Exploring lending async iterators

Talkat RustLab 2024 · 2024-11-09..11-11· [rust, concurrency]
links:none on file
slides:none on file

Defines a concrete lending async iterator trait that uses a GAT'd AssociatedType item<'a> so the yielded value borrows from the iterator and self must outlive the item; uses Pin and shows pin projection with the pin-project crate to avoid unsafe in many places. Builds a three-state, no-allocation TCP reader for Embassy that returns borrowed slices (works as a prototype, main branch compiles). Requires nightly borrowck/Polonius flags for some combinators and resorts to unsafe pin_unchecked for filter-like adapters.

AI-written summary · about

  1. 0:00Introduction
  2. 1:06What are lending async iterators
  3. 8:14Understanding Pin in Rust
  4. 14:45Implementing lending async iterators
  5. 19:52TCP reader abstraction
  6. 23:08Extending lending async iterators
  7. 34:20Challenges and limitations
  8. 35:45Rust’s bleeding edge
  9. 36:51Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.