Skip to main content

Module types

Module types 

Source
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 euclid here because consumers may want to use a different geometry crate.
SourceNodeId
Opaque per-engine node identity. Lanes choose how to mint these; consumers only compare for equality and use them as map keys.
SourceRange
Half-open [start, end) byte-offset range into the lane’s source text. Returned by text_range_for_fragment and consumed by rects_for_selection. Byte offsets, not chars or grapheme clusters, because that’s what source/edit machinery needs.