Using anyhow while writing a library.

93 points Krone9891

So ive been writing a library and I realised that I've been using anyhow as my error types, is this correct?

Should I use anyhow or should I create custom error types that implement std::error:Error, since anyhow::Error works with anything that implements that trait.

​

EDIT: Thank you for the responses! I've looked at thiserror and ill be using that.