Skip to content

Glossary: Rust Beyond the Basics

From

Also written: From trait, #[from]

A trait for converting one type into another. The `?` operator uses it to convert an error into the function's error type, and thiserror's `#[from]` writes the impl for you.

Where the book teaches it

Related terms

thiserrormap_err