Expand description
Theme serialization and deserialization via oxicode.
Provides a compact, Pure-Rust binary representation of a theme snapshot (design tokens + typography scale) that can be saved to disk or transmitted over the network and reconstructed without loss.
§Format
The serialized form is a length-prefixed ThemeSnapshot encoded with
oxicode’s standard configuration (variable-length integers, little-endian
floats, no external schema). The format is opaque binary; for human-editable
theme files use serde_json on top of
these types instead.
§Example
use oxiui_theme::serial::{deserialize_theme, serialize_theme, ThemeSnapshot};
let snapshot = ThemeSnapshot::default();
let bytes = serialize_theme(&snapshot).expect("serialize");
let restored = deserialize_theme(&bytes).expect("deserialize");
assert_eq!(snapshot, restored);Structs§
- Theme
Snapshot - A serializable snapshot of the design-token, typography, palette, and font layers of a theme.
Functions§
- deserialize_
theme - Deserialise a
ThemeSnapshotfrom bytes produced byserialize_theme. - serialize_
theme - Serialise a
ThemeSnapshotto a compact binary blob viaoxicode.