Skip to main content

serialize_theme

Function serialize_theme 

Source
pub fn serialize_theme(snapshot: &ThemeSnapshot) -> Result<Vec<u8>, UiError>
Expand description

Serialise a ThemeSnapshot to a compact binary blob via oxicode.

The returned bytes can be saved to disk and later restored with deserialize_theme.

ยงErrors

Returns UiError::Other if the oxicode encoder encounters an unexpected error (e.g. out-of-memory when allocating the output buffer).