// PublicError is public, but opaque and easy to keep compatible.
#[derive(Error, Debug)]
#[error(transparent)]
pub struct PublicError(#[from] ErrorRepr);
impl PublicError {
// Accessors for anything we do want to expose publicly.
}
// Private and free to change across minor version of the crate.
#[derive(Error, Debug)]
enum ErrorRepr {
...
}