swash/text/cluster/
mod.rs1mod char;
11#[allow(clippy::module_inception)]
12mod cluster;
13mod complex;
14mod info;
15mod myanmar;
16mod parse;
17mod simple;
18mod token;
19
20pub use self::{
21 char::{Char, ShapeClass},
22 cluster::{CharCluster, SourceRange, Status, MAX_CLUSTER_SIZE},
23 info::{CharInfo, ClusterInfo, Emoji, Whitespace},
24 parse::Parser,
25 token::Token,
26};
27
28use super::unicode_data;
29
30#[derive(Copy, Clone, PartialOrd, Ord, PartialEq, Eq, Debug)]
32#[repr(u8)]
33pub enum Boundary {
34 None = 0,
36 Word = 1,
38 Line = 2,
40 Mandatory = 3,
42}
43
44impl Boundary {
45 pub(super) fn from_raw(raw: u16) -> Self {
46 match raw & 0b11 {
47 0 => Self::None,
48 1 => Self::Word,
49 2 => Self::Line,
50 3 => Self::Mandatory,
51 _ => Self::None,
52 }
53 }
54}
55
56pub type UserData = u32;