Skip to main content

Module named

Module named 

Source
Expand description

Code for resolving name grid lines and areas

Structsยง

GridLineNames
The names of each explicit grid line in a single axis, stored in CSR (compressed sparse row) format: a single flat Vec of names plus a Vec of offsets into it (one more offset than there are lines). The names of line i (0-indexed) are names[offsets[i]..offsets[i + 1]].
GridLineNamesIter
Iterator over the per-line name groups of a GridLineNames. Yields one &[S] per grid line (which is empty for unnamed lines)
NamedLineResolver ๐Ÿ”’
Resolver that takes grid lines names and area names as input and can then be used to resolve line names of grid placement properties into line numbers.
NamedLineResolverAxis ๐Ÿ”’
Resolver for named placements in one grid axis
StrHasher ๐Ÿ”’
Wrap an AsRef<str> type with a type which implements Hash by first deferring to the underlying &strโ€™s implementation of Hash.

Functionsยง

upsert_line_name_map ๐Ÿ”’
Utility function to create or update an entry in a line name map

Type Aliasesยง

LinePositions ๐Ÿ”’
The one-indexed line positions of a single grid line name. Inline capacity of 4 keeps the type the same size as Vec<u32> (24 bytes) while avoiding a heap allocation for names mapping to at most 4 lines (the common case)
NamedGridLinesMap ๐Ÿ”’
Map from a grid line name to its one-indexed line positions