Skip to content

Glossary: Rust Beyond the Basics

Box<dyn Error>

Also written: Box<dyn std::error::Error>

A box holding any type that implements the standard `Error` trait. It lets one function return different kinds of errors, but the error is vague.

Where the book teaches it

Related terms

Error traittrait objectanyhow