Summary

In this section, we studied handling data in more detail. Specifically, (de)serializing and parsing. At the time of writing, Serde and related crates are the community-supported way of (de)serializing data in Rust, while nom is the most frequently used parser combinator. These tools tend to produce better error messages on the nightly compiler, and with a few feature flags turned on, since they often depend on a few cutting edge night-only features. With time, these features will be available in the stable compiler, and these tools will work seamlessly.

In the next chapter, we will talk about the next steps after having made sense of incoming data on a socket. More often than not, this involves dealing with application-level protocols. ...

Get Network Programming with Rust now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.