Mark platform extension enums as #[non_exhaustive]

OS-defined sets and error enums in the platform crates can now gain
variants without a breaking change.
This commit is contained in:
Olivier Goffart
2026-07-28 14:30:09 +00:00
parent 37d8a503e4
commit 9c7e191407
7 changed files with 13 additions and 0 deletions

View File

@@ -54,6 +54,7 @@ pub type HMONITOR = *mut c_void;
/// [`DWM_SYSTEMBACKDROP_TYPE docs`]: https://learn.microsoft.com/en-us/windows/win32/api/dwmapi/ne-dwmapi-dwm_systembackdrop_type
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[non_exhaustive]
pub enum BackdropType {
/// Corresponds to `DWMSBT_AUTO`.
///
@@ -113,6 +114,7 @@ impl Default for Color {
#[repr(i32)]
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[non_exhaustive]
pub enum CornerPreference {
/// Corresponds to `DWMWCP_DEFAULT`.
///