Expand description
serde adapter for Attributes::dir. lumen-core carries no serde
dependency, so LayoutDirection cannot derive Serialize/Deserialize
itself; this module maps Option<LayoutDirection> to a stable, compact
Option<u8> (0 = Auto, 1 = Ltr, 2 = Rtl) for the AOT artifact.
Keeping the mapping here (rather than adding serde to lumen-core) keeps
the parser-independent runtime free of an extra core dependency.
Functionsยง
- deserialize
- Deserialize
Option<u8>back intoOption<LayoutDirection>. Unknown tags degrade toLayoutDirection::Auto, mirroring theFrom<&str>parser fallback. - serialize
- Serialize
Option<LayoutDirection>asOption<u8>.