Skip to main content

Module serialization

Module serialization 

Source
Expand description

Scene serialization — on-demand service backed by strategies from khora-data.

The SerializationStrategy trait and concrete implementations live in khora_data::scene. This module provides the SerializationService that orchestrates them for file I/O.

Structs§

ArchetypeSerializationStrategy
A serialization strategy that uses the “Archetype” strategy.
DefinitionSerializationStrategy
A serialization strategy that uses a stable, intermediate representation.
MessagePackSerializationStrategy
MessagePack-encoded SceneRecipe. Identifier KH_MESSAGEPACK_V1.
RecipeSerializationStrategy
A serialization strategy that uses a sequence of commands (SceneRecipe).
SceneMigrationRegistration
Inventory entry for plugin-registered migrations.
SerializationService
The serialization service.

Enums§

DeserializationError
An error that can occur during the deserialization process.
MigrationError
Migration step failure. Wraps strategy-specific errors as text so the runner can keep its surface narrow.
SerializationError
An error that can occur during the serialization process.
SerializationServiceError
An error that can occur within the SerializationService.

Constants§

CURRENT_SCENE_VERSION
Scene format version produced by today’s writers. Bumped whenever the on-disk layout changes; older payloads run through registered SceneMigrations on the way in.

Traits§

SceneMigration
One step of a scene-format migration. Receives the raw payload bytes emitted by the previous version’s strategy and returns the bytes the next version’s strategy expects.
SerializationStrategy
The abstract contract for a scene serialization strategy.

Functions§

migrate_payload
Apply registered migrations to bring payload from from_version up to to_version. Returns the (possibly unchanged) payload bytes.