euv-core 0.48.2

Core cross-platform runtime for euv featuring arena-based fine-grained reactivity, deterministic layout, flat scene graph, multi-mode rendering, and direct OS platform adapters.
Documentation
/// Number of 2-way associative sets in `TextSizeCache` (power of two).
pub(crate) const TEXT_SIZE_CACHE_SETS: usize = 1024;

/// Bitmask for mapping a mixed hash to a `TextSizeCache` set index.
pub(crate) const TEXT_SIZE_CACHE_SET_MASK: usize = TEXT_SIZE_CACHE_SETS - 1;

/// Number of associative ways per set in `TextSizeCache`.
pub(crate) const TEXT_SIZE_CACHE_WAYS: usize = 2;

/// Total number of slots in `TextSizeCache`.
pub(crate) const TEXT_SIZE_CACHE_SLOTS: usize = TEXT_SIZE_CACHE_SETS * TEXT_SIZE_CACHE_WAYS;

/// Occupancy bit set in `TextStyleKey::style_flags` for populated cache slots.
pub(crate) const TEXT_SIZE_ENTRY_OCCUPIED: u16 = 1 << 8;

/// Sentinel bit pattern representing `max_width == None` in `TextSizeEntry`.
pub(crate) const TEXT_SIZE_MAX_WIDTH_NONE_BITS: u32 = u32::MAX;

/// `TextSizeEntry::entry_flags` bit indicating `(max_content_w, single_line_h)` is populated.
pub(crate) const TEXT_SIZE_ENTRY_HAS_UNWRAPPED: u8 = 1 << 0;

/// `TextSizeEntry::entry_flags` bit indicating `(last_max_w_bits, last_wrapped_w, last_wrapped_h)` is populated.
pub(crate) const TEXT_SIZE_ENTRY_HAS_WRAPPED: u8 = 1 << 1;

/// `TextSizeEntry::entry_flags` bit indicating unconstrained `max_width == None` `(none_w, none_h)` is populated.
pub(crate) const TEXT_SIZE_ENTRY_HAS_NONE: u8 = 1 << 2;

/// `TextSizeEntry::entry_flags` bit indicating `min_content_w` is populated.
pub(crate) const TEXT_SIZE_ENTRY_HAS_MIN_CONTENT: u8 = 1 << 3;

/// Primary 64-bit hash seed for `TextSizeCache`.
pub(crate) const TEXT_HASH_SEED_A: u64 = 0xcbf2_9ce4_8422_2325;

/// Secondary 64-bit hash seed for `TextSizeCache`.
pub(crate) const TEXT_HASH_SEED_B: u64 = 0x9e37_79b9_7f4a_7c15;

/// Primary 64-bit hash multiplier for `TextSizeCache`.
pub(crate) const TEXT_HASH_PRIME_A: u64 = 0x0000_0100_0000_01b3;

/// Secondary 64-bit hash multiplier for `TextSizeCache`.
pub(crate) const TEXT_HASH_PRIME_B: u64 = 0x517c_c1b7_2722_0a95;

/// Primary Murmur3/SplitMix64 avalanche constant for `TextSizeCache`.
pub(crate) const TEXT_HASH_FINAL_A: u64 = 0xff51_afd7_ed55_8ccd;

/// Secondary Murmur3/SplitMix64 avalanche constant for `TextSizeCache`.
pub(crate) const TEXT_HASH_FINAL_B: u64 = 0xc4ce_b9fe_1a85_ec53;

/// Number of LRU measure cache slots per node inside `SplitLayoutCache`.
pub(crate) const MEASURE_CACHE_SLOTS: usize = 4;

/// Empty layout dependency bitmask (measurement independent of available space and viewport).
pub(crate) const LAYOUT_DEP_NONE: u8 = 0;

/// Layout dependency bit indicating measurement depended on incoming available width.
pub(crate) const LAYOUT_DEP_AVAIL_W: u8 = 1 << 0;

/// Layout dependency bit indicating measurement depended on incoming available height.
pub(crate) const LAYOUT_DEP_AVAIL_H: u8 = 1 << 1;

/// Layout dependency bit indicating measurement depended on root viewport dimensions (`vw`/`vh`).
pub(crate) const LAYOUT_DEP_VIEWPORT: u8 = 1 << 2;

/// `SplitLayoutCache::subtree_flags` bit indicating `subtree_bounds[idx]` is valid for the live node generation.
pub(crate) const SUBTREE_FLAG_VALID: u8 = 1 << 0;

/// `SplitLayoutCache::subtree_flags` bit indicating the container has at least one child with `z_index != 0`.
pub(crate) const SUBTREE_FLAG_NONZERO_Z_CHILD: u8 = 1 << 1;

/// `FlexItemRecord::flags` bit indicating `LayoutStyle::width == Length::Auto`.
pub(crate) const FLEX_ITEM_WIDTH_AUTO: u16 = 1 << 0;

/// `FlexItemRecord::flags` bit indicating `LayoutStyle::height == Length::Auto`.
pub(crate) const FLEX_ITEM_HEIGHT_AUTO: u16 = 1 << 1;

/// `FlexItemRecord::flags` bit indicating `LayoutStyle::width` is `Length::Percent(_)`.
pub(crate) const FLEX_ITEM_WIDTH_PERCENT: u16 = 1 << 2;

/// `FlexItemRecord::flags` bit indicating `LayoutStyle::height` is `Length::Percent(_)`.
pub(crate) const FLEX_ITEM_HEIGHT_PERCENT: u16 = 1 << 3;

/// Default `FlexItemRecord::flags` mask for an unattached auto-sized fallback entry.
pub(crate) const FLEX_ITEM_DEFAULT_FLAGS: u16 = FLEX_ITEM_WIDTH_AUTO + FLEX_ITEM_HEIGHT_AUTO;