Currently when new error variants are added, we have to bump a major version. I don't expect new errors to be added, but if it happens, we should add #[non_exhaustive] to all the errors in this crate.
Alternatively we could switch to private error variants like pub struct Error(Reason); enum Reason { ... }. I don't like this approach right now as we have a limited amount of errors that still make sense to match on in the user code
Currently when new error variants are added, we have to bump a major version. I don't expect new errors to be added, but if it happens, we should add
#[non_exhaustive]to all the errors in this crate.Alternatively we could switch to private error variants like
pub struct Error(Reason); enum Reason { ... }. I don't like this approach right now as we have a limited amount of errors that still make sense to match on in the user code