feat(serde): derive Serialize/Deserialize for alignment enums (#1957)

Resolves #1954
This commit is contained in:
Jagoda Estera Ślązak 2025-06-28 23:48:16 +02:00 committed by GitHub
parent 6dcd53bc6b
commit b9da1926a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,6 +19,7 @@ pub type Alignment = HorizontalAlignment;
///
/// For comprehensive layout documentation and examples, see the [`layout`](crate::layout) module.
#[derive(Debug, Default, Display, EnumString, Clone, Copy, Eq, PartialEq, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum HorizontalAlignment {
#[default]
Left,
@ -33,6 +34,7 @@ pub enum HorizontalAlignment {
///
/// For comprehensive layout documentation and examples, see the [`layout`](crate::layout) module.
#[derive(Debug, Default, Display, EnumString, Clone, Copy, Eq, PartialEq, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum VerticalAlignment {
#[default]
Top,