Session

Unlocking Nested Data at Zero-Cost

Working with complex, nested data in Rust often involves verbose chains of field access and match statements, which can obscure intent and hinder code reuse. This talk presents a Rust library that successfully adapts a powerful, language-level feature from Swift—the KeyPath—to solve this problem. It introduces type-safe KeyPath and CasePath types that serve as first-class, composable references to properties and enum variants.

The session will dissect how this library translates Swift's elegant, reference-based model into Rust's world of ownership and explicit lifetimes. Key architectural decisions, including the choice between static and dynamic dispatch for optimal performance, will be explored. Attendees will learn how these abstractions enable declarative data traversal, reduce boilerplate, and maintain Rust's stringent safety guarantees, all while benchmark results demonstrate minimal to zero runtime overhead compared to manual code.

Akash Soni

Sr Engineer at NPCI X CFPL

Delhi, India

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top