1mod baseline;
21mod delta;
22mod error;
23mod limits;
24mod scratch;
25mod snapshot;
26mod types;
27
28pub use baseline::{BaselineError, BaselineStore};
29pub use delta::{
30 apply_delta_snapshot, apply_delta_snapshot_from_packet, decode_delta_packet,
31 encode_delta_snapshot, encode_delta_snapshot_with_scratch, select_baseline_tick, DeltaDecoded,
32 DeltaUpdateComponent, DeltaUpdateEntity,
33};
34pub use error::{CodecError, CodecResult, LimitKind, MaskKind, MaskReason, ValueReason};
35pub use limits::CodecLimits;
36pub use scratch::CodecScratch;
37pub use snapshot::{
38 decode_full_snapshot, decode_full_snapshot_from_packet, encode_full_snapshot,
39 ComponentSnapshot, EntitySnapshot, FieldValue, Snapshot,
40};
41pub use types::{EntityId, SnapshotTick};
42pub use wire::Limits as WireLimits;
43
44#[cfg(test)]
45mod tests {
46 use super::*;
47
48 #[test]
49 fn public_api_exports() {
50 let _ = SnapshotTick::new(0);
52 let _ = EntityId::new(0);
53 let _ = WireLimits::default();
54 let _ = CodecLimits::default();
55
56 let _: CodecResult<()> = Ok(());
58 }
59
60 #[test]
61 fn snapshot_tick_usage() {
62 let tick = SnapshotTick::new(100);
63 assert_eq!(tick.raw(), 100);
64 assert!(!tick.is_zero());
65 }
66
67 #[test]
68 fn entity_id_usage() {
69 let id = EntityId::new(42);
70 assert_eq!(id.raw(), 42);
71 }
72
73 #[test]
74 fn limits_reexported() {
75 let limits = WireLimits::default();
77 assert!(limits.max_packet_bytes > 0);
78 }
79}