-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Currently these types are public enums. I don't think this is ideal for creating a stable interface. The enums are marked non_exhaustive, so we can add variants without it being a breaking change, but we can't change the variants' data or remove variants.
And I don't think there's any good reason why a user would want to match on these values, so it's a needlessly expressive part of the API.
So I'm thinking of changing the API to something like:
pub struct Corrupt(CorruptKind);
pub struct Corrupt(IncompatibleKind);
pub(crate) enum CorruptKind {
// All the variants that are currently in the Corrupt enum.
}
pub(crate) enum IncompatibleKind {
// All the variants that are currently in the Incompatible enum.
}The Debug/Display impls will still carry all the same information, you just won't be able to directly access it.
Metadata
Metadata
Assignees
Labels
No labels