Skip to main content

take_key

Function take_key 

Source
fn take_key(
    keys: &mut HashMap<String, usize>,
    opened: Option<String>,
    frame: Option<&str>,
) -> Option<String>
Expand description

What names a settled row: the instant the turn’s own first row carried, which survives an insertion above it where a count of the rows before it does not.

Two turns can open on one clock - the CLI writes a command and its answer in the same millisecond - and the page keeps ONE map of the rows it has been told to open, so two rows sharing a name would open and close together. No transcript measured emits such a pair, and what stops one today is drew_work, a guard about a turn drawing rather than about its being named, so a name already taken in this fold takes an ordinal instead of resting on that. Deterministic for a fixed transcript, unique within one. The frame’s own id stands in for a turn the fold placed no clock on, and a turn with neither is named by nothing rather than by someone else’s name.