Expand description
Replication schema and field codec definitions for the sdec codec.
This crate defines how game state is represented for replication:
- Schema model for entity types, components, and fields
- Field codecs (bool, integers, fixed-point, varints)
- Quantization and threshold configuration
- Deterministic schema hashing
§Design Principles
- Runtime-first - the initial release uses runtime schema building; derive macros come later.
- Explicit schemas - No reflection on arbitrary Rust types.
- Deterministic hashing - Schema hash is stable given the same definition.
Structs§
- Component
Def - A component definition within a schema.
- Component
Id - A component ID within a schema (non-zero).
- Field
Def - Field definition within a component.
- FieldId
- A field ID within a component (non-zero).
- Fixed
Point - Fixed-point quantization parameters (all integer-based).
- Schema
- A schema consisting of ordered components.
- Schema
Builder - Builder for
Schema.
Enums§
- Change
Policy - Change detection policy for a field.
- Field
Codec - The encoding for a field (representation only).
- Schema
Error - Errors that can occur when building or validating a schema.
Functions§
- schema_
hash - Computes a deterministic hash for schema validation.
Type Aliases§
- Schema
Result - Result type for schema operations.