Intermediate Rust
Q77 / 100

What is the thiserror crate used for?

Correct! Well done.

Incorrect.

The correct answer is B) A derive macro that generates error boilerplate (Display, Error, From) for custom error types

B

Correct Answer

A derive macro that generates error boilerplate (Display, Error, From) for custom error types

Explanation

#[derive(Error)] #[error("file {path} not found")] struct FileNotFound { path: String } generates Display and std::error::Error implementation.

Progress
77/100