Macros

One of the most useful Rust functionalities is its macro ecosystem. You probably already know the println!() macro, but there are many more. These macros allow you to write complex boilerplate code (such as stdio handling in the println!() case) in a simple way and without having to add a ton of boilerplate code. Let's check out some of the most used ones.

Get Rust High Performance 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.