Skip to content

Glossary: Rust Beyond the Basics

bail!

Also written: anyhow!

An anyhow macro that returns early with an error built from a message, formatted like `format!`. `anyhow!` makes the same error without returning it.

Where the book teaches it

Related terms

anyhowwith_context