Module content
Expand description
Large parts of a recorded action, kept as content and named by hash.
Every change records the action it ran (crate::ActionContext::action)
so a receiver can replay it. An action whose payload is larger than the
history budget (a paste with images inline) still records it: each long
text or byte run of its payload is kept in the content store
the host lends (keep_content_in) and the recorded payload names it by
its BLAKE3 hash.
A receiver resolves those names from its content store before it
replays; until the content arrives the change is held, as a change whose
app surface has not arrived is.
A reference is the JSON object {"tilo.content/1": "<hash>", "as": "text" | "bytes" | "json"} in place of the string, byte array, or
array or object (a long list of small parts: a pasted book’s
paragraphs) it stands for.
Structs§
- Content
Parts - The parts of recorded actions kept as content, by their address (BLAKE3, lower-case hex), for the host’s content store.
- Missing
Content - Content a recorded action names that is not here yet.
Constants§
- CONTENT_
PART_ THRESHOLD - The shortest text or byte run kept as content rather than inline.
- CONTENT_
REFERENCE_ KEY - The key a content reference is written under.
Functions§
- keep_
content_ in - Keep the content every change this thread commits names in
keep(the app’s content store), and read the content a received change names fromread, so recorded actions replay wherever their content reaches. The host sets both once per thread that runs actions.