Expand description
A cache for storing the results of layout computation
StructsΒ§
- Cache
- A cache for caching the results of a sizing a Grid Item or Flexbox Item
- Cache
Entry π - Cached intermediate layout results
- Cache
Key π - Space-optimised cache key that packs bits into as small a size as possible
- Cache
Mode π - The layout inputs that affect a nodeβs layout but are not part of the
CacheKey: theSizingModeand whether each of the nodeβs vertical margins is collapsible, packed into au8.
EnumsΒ§
- Clear
State - Clear operation outcome. See
Cache::clear
ConstantsΒ§
- BOTH_
SIGN_ πBITS_ MASK - Mask of both sign bits (used to compute NON_SIGN_BITS_MASK)
- CACHE_
SIZE π - The number of cache entries for each node in the tree
- INFINITY_
BITS π f32::INFINITYas a u32- MODE_
CHANGE_ πEVICTIONS - See [
cache_mode_change_evictions] - NEG_
INFINITY_ πBITS f32::NEG_INFINITYas a u32- NON_
SIGN_ πBITS_ MASK - Mask of excluding the sign bits (used when setting/getting the size excluding the packed bits)
- SIGN_
BIT_ π1 - The sign bit of the first f32
- SIGN_
BIT_ π2 - The sign bit of the second f32
- X_
AXIS_ πVALUE_ MASK - Mask which includes only the bits which encode the x-axis value that we can use to ignore the y-axis value when comparing a cache key.
FunctionsΒ§
- available_
space_ πcache_ key - Pack
AvailableSpaceintou32 - mixed_
cache_ πkey - Encodes combination of a
known_dimension(Option) and AvailableSpacein a single dimension into a cache key in a single dimension. - option_
cache_ πkey - Pack
Option<f32>intou32 - size_
available_ πspace_ cache_ key - Pack
Size<AvailableSpace>intou64 - size_
mixed_ πcache_ key - Encodes combination of a
known_dimension(Option) and AvailableSpacein two dimensions into a cache key in a single dimension. - size_
option_ πcache_ key - Pack
Size<Option<f32>>intou64