@@ -224,9 +224,10 @@ impl Placement {
224224}
225225
226226/// Writing direction.
227- #[ derive( Debug , Copy , Clone , Eq , PartialEq , Hash ) ]
227+ #[ derive( Debug , Copy , Clone , Default , Eq , PartialEq , Hash ) ]
228228pub enum WritingMode {
229229 /// Horizontal writing mode, left-to-right.
230+ #[ default]
230231 LtrTtb ,
231232 /// Horizontal writing mode, right-to-left.
232233 RtlTtb ,
@@ -245,9 +246,10 @@ impl WritingMode {
245246}
246247
247248/// Layout border style.
248- #[ derive( Debug , Copy , Clone , Eq , PartialEq , Hash ) ]
249+ #[ derive( Debug , Copy , Clone , Default , Eq , PartialEq , Hash ) ]
249250pub enum LayoutBorderStyle {
250251 /// No border.
252+ #[ default]
251253 None ,
252254 /// Hidden border.
253255 Hidden ,
@@ -340,9 +342,10 @@ impl LayoutAttributes<'_> {
340342}
341343
342344/// The text alignment.
343- #[ derive( Debug , Copy , Clone , Eq , PartialEq , Hash ) ]
345+ #[ derive( Debug , Copy , Clone , Default , Eq , PartialEq , Hash ) ]
344346pub enum TextAlign {
345347 /// At the start of the inline advance direction.
348+ #[ default]
346349 Start ,
347350 /// Centered.
348351 Center ,
@@ -404,9 +407,10 @@ impl LayoutAttributes<'_> {
404407}
405408
406409/// The block alignment.
407- #[ derive( Debug , Copy , Clone , Eq , PartialEq , Hash ) ]
410+ #[ derive( Debug , Copy , Clone , Default , Eq , PartialEq , Hash ) ]
408411pub enum BlockAlign {
409412 /// At the start of the block advance direction.
413+ #[ default]
410414 Before ,
411415 /// Centered.
412416 Middle ,
@@ -449,9 +453,10 @@ impl LayoutAttributes<'_> {
449453}
450454
451455/// The inline alignment.
452- #[ derive( Debug , Copy , Clone , Eq , PartialEq , Hash ) ]
456+ #[ derive( Debug , Copy , Clone , Default , Eq , PartialEq , Hash ) ]
453457pub enum InlineAlign {
454458 /// At the start of the inline advance direction.
459+ #[ default]
455460 Start ,
456461 /// Centered.
457462 Center ,
@@ -513,10 +518,11 @@ impl LayoutAttributes<'_> {
513518}
514519
515520/// The height of a line.
516- #[ derive( Debug , Copy , Clone , PartialEq ) ]
521+ #[ derive( Debug , Copy , Clone , Default , PartialEq ) ]
517522pub enum LineHeight {
518523 /// Adjust the line height automatically, taking `/BaselineShift` into
519524 /// account.
525+ #[ default]
520526 Normal ,
521527 /// Adjust the line height automatically.
522528 Auto ,
@@ -535,9 +541,10 @@ impl LineHeight {
535541}
536542
537543/// Where the text is positioned relative to the baseline.
538- #[ derive( Debug , Copy , Clone , Eq , PartialEq , Hash ) ]
544+ #[ derive( Debug , Copy , Clone , Default , Eq , PartialEq , Hash ) ]
539545pub enum LayoutTextPosition {
540546 /// At the baseline.
547+ #[ default]
541548 Normal ,
542549 /// Above the baseline.
543550 Superscript ,
@@ -556,9 +563,10 @@ impl LayoutTextPosition {
556563}
557564
558565/// The text decoration type (over- and underlines).
559- #[ derive( Debug , Copy , Clone , Eq , PartialEq , Hash ) ]
566+ #[ derive( Debug , Copy , Clone , Default , Eq , PartialEq , Hash ) ]
560567pub enum TextDecorationType {
561568 /// No decoration.
569+ #[ default]
562570 None ,
563571 /// Underlined.
564572 Underline ,
@@ -605,7 +613,7 @@ impl LayoutAttributes<'_> {
605613}
606614
607615/// The alignment of a ruby annotation.
608- #[ derive( Debug , Copy , Clone , Eq , PartialEq , Hash ) ]
616+ #[ derive( Debug , Copy , Clone , Default , Eq , PartialEq , Hash ) ]
609617pub enum RubyAlign {
610618 /// At the start of the inline advance direction.
611619 Start ,
@@ -616,6 +624,7 @@ pub enum RubyAlign {
616624 /// Justified.
617625 Justify ,
618626 /// Distribute along the full width of the line with additional space.
627+ #[ default]
619628 Distribute ,
620629}
621630
@@ -632,9 +641,10 @@ impl RubyAlign {
632641}
633642
634643/// The position of a ruby annotation.
635- #[ derive( Debug , Copy , Clone , Eq , PartialEq , Hash ) ]
644+ #[ derive( Debug , Copy , Clone , Default , Eq , PartialEq , Hash ) ]
636645pub enum RubyPosition {
637646 /// Before edge of the element.
647+ #[ default]
638648 Before ,
639649 /// After edge of the element.
640650 After ,
@@ -700,9 +710,10 @@ impl<'a> ListAttributes<'a> {
700710deref ! ( ' a, ListAttributes <' a> => Dict <' a>, dict) ;
701711
702712/// The list numbering type.
703- #[ derive( Debug , Copy , Clone , Eq , PartialEq , Hash ) ]
713+ #[ derive( Debug , Copy , Clone , Default , Eq , PartialEq , Hash ) ]
704714pub enum ListNumbering {
705715 /// No numbering.
716+ #[ default]
706717 None ,
707718 /// An unordered list with unspecified bullets. PDF 2.0+.
708719 Unordered ,
@@ -817,9 +828,10 @@ impl FieldRole {
817828}
818829
819830/// Whether a check box or radio button is checked.
820- #[ derive( Debug , Copy , Clone , Eq , PartialEq , Hash ) ]
831+ #[ derive( Debug , Copy , Clone , Default , Eq , PartialEq , Hash ) ]
821832pub enum FieldState {
822833 /// The check box or radio button is unchecked.
834+ #[ default]
823835 Unchecked ,
824836 /// The check box or radio button is checked.
825837 Checked ,
0 commit comments