fix: derive serde traits

This commit is contained in:
Ashley Wulber 2024-10-16 17:35:05 -04:00
parent 757d0753ad
commit 1d1819c9b1
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820

View file

@ -71,6 +71,7 @@ pub enum Family {
/// The weight of some text. /// The weight of some text.
#[allow(missing_docs)] #[allow(missing_docs)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum Weight { pub enum Weight {
Thin, Thin,
ExtraLight, ExtraLight,
@ -87,6 +88,7 @@ pub enum Weight {
/// The width of some text. /// The width of some text.
#[allow(missing_docs)] #[allow(missing_docs)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum Stretch { pub enum Stretch {
UltraCondensed, UltraCondensed,
ExtraCondensed, ExtraCondensed,
@ -103,6 +105,7 @@ pub enum Stretch {
/// The style of some text. /// The style of some text.
#[allow(missing_docs)] #[allow(missing_docs)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum Style { pub enum Style {
#[default] #[default]
Normal, Normal,