Rustacean Station  cover image

What's New in Rust 1.40

Rustacean Station

00:00

Using Patterns in a Pattern Context?

The most common case for this is a, you have astruct of some type, and you wan to look at just one field of that struct a. And so it ends up being a pattern that's not just a direct field access. In the past, as a library author, you sort of just had the choice of either i make this field public and then let people access it,. But if i add a field later, anyone who matches on it, that pattern is no longer going to compile because it doesn't mention this new field that i've added.

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app