pub struct SelectedId(/* private fields */);Expand description
An opaque ordinal into ONE Selection.
The field is private and the constructor is private to this module, so a value of this
type can only have come from a Selection’s own accessors. That is what makes pair
endpoints structurally non-leaky downstream: there is no way to name a row that was
never selected.
An ordinal taken from one selection and applied to another is a programming error, not a data error; the accessors panic with a named message rather than returning a plausible row from the wrong selection.
Implementations§
Source§impl SelectedId
impl SelectedId
Sourcepub fn ordinal(self) -> u32
pub fn ordinal(self) -> u32
The zero-based position of this row in its selection’s ordered list.
Exposed so pair bytes can be encoded and hashed by ORDINAL rather than by variable-length identifier — the pair manifest already commits the selection’s semantic hash, so the ordinals are unambiguous inside it.
This is an accessor, not a constructor: reading the number cannot mint a
SelectedId, so the type remains proof of membership in the selection that
produced it.