rpdfium_doc/variable_text/vt_word_range.rs
1// Derived from PDFium's cpvt_wordrange.h
2// Original: Copyright 2014 The PDFium Authors
3// Licensed under BSD-3-Clause / Apache-2.0
4// See pdfium-upstream/LICENSE for the original license.
5
6//! Word range — a span of characters in laid-out text (`CPVT_WordRange`).
7//!
8//! Represents a contiguous range of characters from a begin position
9//! (inclusive) to an end position (exclusive).
10
11use super::vt_word_place::WordPlace;
12
13/// A range of positions within the laid-out text.
14///
15/// Corresponds to upstream `CPVT_WordRange`.
16#[derive(Debug, Clone, Copy, PartialEq, Eq)]
17pub struct WordRange {
18 /// Start position (inclusive).
19 pub begin: WordPlace,
20 /// End position (exclusive).
21 pub end: WordPlace,
22}