Skip to main content

Crate moq_json

Crate moq_json 

Source
Expand description

Snapshot/delta JSON publishing over moq-net tracks.

A JSON value is published over a track as a series of groups, where each group is self-contained: its first frame is a full snapshot and any following frames are RFC 7396 JSON Merge Patch deltas applied in order. A consumer jumps to the newest group, reads the snapshot, and applies the deltas, so a late joiner never needs older groups.

Deltas are opt-in via Config::delta_ratio. With deltas disabled (the default) every change is a fresh snapshot group, matching a plain “one JSON blob per group” track.

Structs§

Config
Configuration for a Producer.
Consumer
Consumes a JSON value from a track, reconstructing it from snapshots and deltas.
Guard
An RAII editing guard returned by Producer::lock.
Producer
Publishes a JSON value over a track, choosing snapshots and deltas automatically.

Enums§

Error
Errors produced while publishing or consuming JSON.

Type Aliases§

Result
A Result using this crate’s Error.