Designing for Ownership
summary
Refactors a Rust serverless handler into a single Workload struct built with TryFrom from the incoming event, replaces unnecessary Rc and Box indirections by using references with lifetimes for strategies and ownership only where needed, and fixes a surprising compiler issue where a boxed trait object forced a 'static requirement; changing the executor to take ownership and consume the workload (one‑time run) removes clones, compiles cleanly, and simplifies data flow.
AI-written summary · about
chapters (13)
- 0:00Designing for ownership
- 2:09Refactoring is essential
- 3:36From messy code to refactoring
- 6:03Problem with reference counters
- 9:37Rediscovering Java and ownership
- 10:42Pointer relationships complexity
- 13:11Refactoring results and trade-offs
- 14:56Data flow in design
- 17:03Flow-based programming
- 20:11Refactoring strategies
- 22:17Ownership semantics
- 23:21Key lessons
- 24:45Final results and future








