Skip to main content

Module cache

Module cache 

Source
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
CacheEntry ๐Ÿ”’
Cached intermediate layout results
CacheKey ๐Ÿ”’
Space-optimised cache key that packs bits into as small a size as possible

Enumsยง

ClearState
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::INFINITY as a u32
NEG_INFINITY_BITS ๐Ÿ”’
f32::NEG_INFINITY as 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 AvailableSpace into u32
mixed_cache_key ๐Ÿ”’
Encodes combination of a known_dimension (Option) and AvailableSpace in a single dimension into a cache key in a single dimension.
option_cache_key ๐Ÿ”’
Pack Option<f32> into u32
size_available_space_cache_key ๐Ÿ”’
Pack Size<AvailableSpace> into u64
size_mixed_cache_key ๐Ÿ”’
Encodes combination of a known_dimension (Option) and AvailableSpace in two dimensions into a cache key in a single dimension.
size_option_cache_key ๐Ÿ”’
Pack Size<Option<f32>> into u64