Skip to main content

Module registry

Module registry 

Expand description

The ActionRegistry: type_id → decoder, so a replaying peer can turn an EncodedAction back into a live Box<dyn Action> without knowing the concrete type at the call site. An app registers each action type once; the registry is the same seam the OS-wide global-search backend plugs into to enumerate action types across apps.

Structs§

ActionRegistry
Maps a stable type_id to the decoder that reconstructs its action from a payload — cheap to share behind an Arc/& at dispatch time.

Functions§

decode_json
A T from its JSON bytes, through a JSON value: one byte parser for every action type, compiled here, rather than one per type and crate.
decode_payload
A T from the payload of an action of type type_id, like decode_json: a group written with what its members share once (crate::group_form) reads as the list of them.

Type Aliases§

DecodePayload
Decodes one action type’s payload (ActionRegistry::register_decoder).