Skip to main content

encode_finstance_id

Function encode_finstance_id 

Source
pub const fn encode_finstance_id(table_ordinal: u16, row_index: u16) -> u32
Expand description

Encode an FInstance element as a u32 ID.

FInstance elements are (table, row) pairs. We encode them as (table_ordinal << 16) | row_index, where table_ordinal is the index of the table name in lexicographic order. This bijection is faithful when each table has fewer than 2^16 rows.