Skip to main content
Verticopolis engineGitHub

meta_since

Function meta_since 

Source
pub fn meta_since(tower: &Tower, since: Option<i64>) -> Value
Expand description

The metadata a view needs after since, as { "revision", "full", "units": [[id, label, subtype], ...] } (layout::META_RECORD names the record’s fields).

For a since the log can answer (from the log’s floor up to meta_revision), full is false and units lists every unit changed after it that still exists, once each, with its current values. For any other since (None, a revision this tower never reached, or one older than the log answers from, 0 included), full is true and units lists every unit whose label differs from its catalog name or that has a subtype, in unit-list order: a unit it leaves out has its catalog name and no subtype. revision is meta_revision, the since of the next read. A removed unit is never listed, and an id is never given to another unit (Tower::next_id only grows), so what a host still holds for a removed id goes unused. A since belongs to one engine: a load or an attach builds a tower that starts again at revision 1, so a host on a new engine asks with nothing or 0, as it reads a fresh structure.