Expand description
Cross-cutting supporting types shared across the four query traits. Kept minimal — promote types here only when more than one trait module needs them.
Structs§
- Lang
- BCP 47 language tag (e.g., “en”, “en-US”, “zh-Hant”). Owned String
because language tags don’t have a single shared registry crate we
want to force; consumers can
Lang::from(s.to_string())cheaply. - Point
- Viewport-space point (CSS pixels, post-transform). Lane impls translate from their device/layout coordinate space when needed.
- Rect
- Viewport-space rectangle (CSS pixels). Origin-and-size shape; we
avoid pulling in
euclidhere because consumers may want to use a different geometry crate. - Source
Node Id - Opaque per-engine node identity. Lanes choose how to mint these; consumers only compare for equality and use them as map keys.
- Source
Range - Half-open
[start, end)byte-offset range into the lane’s source text. Returned bytext_range_for_fragmentand consumed byrects_for_selection. Byte offsets, not chars or grapheme clusters, because that’s what source/edit machinery needs.