Expand description
Scenes on the wire: a scene to its proto::Scene and back; the patch
between two scenes is patch’s. Each image file and font file travels once: a scene
carries every one its nodes use, a patch only those the scene before it
didn’t have.
Structs§
- Applied
- What a patch did, by id, for a drawing kept beside the scene to follow: the subtrees that left their place — removed, or moved away — the subtrees placed — inserted, or moved here — and the nodes that kept their place and took new own attributes, with the ones they had.
- Uses
- How many nodes of a scene show each image file and are set in each font file: what lets a patch drop the files no node uses any more without walking the scene.
Enums§
- Edit
- One operation of a patch, on the engine’s own nodes: what the wire
carries as a
proto::Op, and what a scene kept beside a resolve is brought across by without its nodes passing through the wire’s form.
Functions§
- apply
- Applies a patch to
scene, whose filesusescounts, or says why it can’t — leaving both as they were. The work is the patch’s: each operation finds its nodes by id, and the files no node uses any more are dropped by count, never by a walk of the scene. - apply_
edits - Applies
editstoscene, whose filesusescounts, with the image and font files they may need — or says why it can’t, leaving both as they were. The work is the edits’: each finds its nodes by id. - bring
- Brings
scene, whose filesusescounts, toto’s content by the patch between them — its nodes keeping their places, so what is kept beside it can follow — withto’s image and font files as they are, never through the wire’s bytes. - decode
- A node from the wire, or why it isn’t one.
- decode_
scene - The scene a stream message carries; image and font files
heldalready has aren’t decoded or checked again. - edits
- The operations from
oldtonew. Each node ofnewthatoldhas is kept — moved if it has another parent or falls out of the longest run of siblings still in their order, and changed if its own attributes did; each oneoldhasn’t is inserted, whole where nothing under it is kept, alone where something is, which is then moved into it. Last, whatoldhas andnewdoesn’t goes: by then nothing kept is under it. - encode
- encode_
edits - Edits in the wire’s form.
- encode_
own - A node’s own attributes for the wire: its children aside.
- patch
- The patch that turns
old, as last sent, intonew, by their nodes’ ids: an insert before the first of 100,000 siblings is one insert. And the image and font filesolddidn’t have. - scene
- A whole scene for the wire: its tree and every image file it shows.
- subtree
- The edits that turn the subtree of
oldatat— whose root has the idnew’s root has — intonew: what a part of a scene resolved again is brought across by, costing that part alone.