Skip to main content

Module components

Module components 

Source
Expand description

Option C: Array-based components with bitflags

This replaces HashMap<Component, i32> with a fixed-size array and bitflags for tracking which components are known vs implied.

Benefits:

  • Copy semantics (no heap allocation, no cloning cost)
  • Cache-friendly (entire struct fits in ~64 bytes)
  • Branch-free access patterns

Structs§

ComponentFlags
Bitflags for tracking which components are set
FastComponents
Fast, stack-allocated date/time components

Enums§

Component
Date/time components that can be parsed