mirror of
https://github.com/ratatui/ratatui.git
synced 2025-09-27 04:50:46 +00:00
feat(serde): derive Serialize/Deserialize for alignment enums (#1957)
Resolves #1954
This commit is contained in:
parent
6dcd53bc6b
commit
b9da1926a0
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user