struct CacheKey {
kd_available_space: u64,
parent_size: u64,
known_dimensions_are_definite: Size<bool>,
}Expand description
Space-optimised cache key that packs bits into as small a size as possible
Fields§
§kd_available_space: u64The initial cached size of the node itself
parent_size: u64The initial cached size of the parent’s node
known_dimensions_are_definite: Size<bool>Whether each known dimension is definite. Normalized such that an axis
without a known dimension is always true.
Implementations§
Source§impl CacheKey
impl CacheKey
Sourcefn parent_size(&self) -> u64
fn parent_size(&self) -> u64
Return the parent size with the extra bits that encode the requested axis masked out
Sourcefn x_axis_parent_size(&self) -> u64
fn x_axis_parent_size(&self) -> u64
Return the parent size with the extra bits that encode the requested axis masked out And the y-axis value masked out
Sourcefn requested_axis_bits(&self) -> u64
fn requested_axis_bits(&self) -> u64
Return the bits that encode the requested axis
Sourcefn size_is_valid_for(&self, other: &CacheKey) -> bool
fn size_is_valid_for(&self, other: &CacheKey) -> bool
Whether a cached entry with this key contains a valid size for the axis requested by other.
Sizes computed for a single axis may contain garbage values in the other axis, so an entry
is only usable if it was computed for the same axis (or for both axes).