#[non_exhaustive]pub enum WrittenUnit {
Show 41 variants
A,
Aa,
B,
B2,
C,
Ch,
Cr,
D,
Dd,
F,
G,
Gx,
H,
Hr,
Hx,
I,
Ix,
J,
K,
K2,
L,
M,
Mvs,
N,
Nirugu,
O,
P,
R,
Rh,
S,
Sh,
Sz,
T,
U,
Ue,
Ux,
W,
Y,
Z,
Zr,
Zwj,
}Expand description
A written unit: an opaque glyph-form identifier produced by shaping (see docs/data-format.md). The structural tokens Mvs, Nirugu and Zwj are members too: they appear verbatim in Shaper::shape output, exactly as the Python implementation emits them.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
A
Written unit A.
Aa
Written unit Aa.
B
Written unit B.
B2
Written unit B2.
C
Written unit C.
Ch
Written unit Ch.
Cr
Written unit Cr.
D
Written unit D.
Dd
Written unit Dd.
F
Written unit F.
G
Written unit G.
Gx
Written unit Gx.
H
Written unit H.
Hr
Written unit Hr.
Hx
Written unit Hx.
I
Written unit I.
Ix
Written unit Ix.
J
Written unit J.
K
Written unit K.
K2
Written unit K2.
L
Written unit L.
M
Written unit M.
Mvs
Structural token: Mongolian vowel separator U+180E (NNBSP U+202F is folded into it).
N
Written unit N.
Nirugu
Structural token: nirugu U+180A, the visible stem extender.
O
Written unit O.
P
Written unit P.
R
Written unit R.
Rh
Written unit Rh.
S
Written unit S.
Sh
Written unit Sh.
Sz
Written unit Sz.
T
Written unit T.
U
Written unit U.
Ue
Written unit Ue.
Ux
Written unit Ux.
W
Written unit W.
Y
Written unit Y.
Z
Written unit Z.
Zr
Written unit Zr.
Zwj
Structural token: zero width joiner U+200D.
Implementations§
Source§impl WrittenUnit
impl WrittenUnit
Sourcepub const ALL: [WrittenUnit; 41]
pub const ALL: [WrittenUnit; 41]
Every variant, in declaration (sorted contract-name) order.
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
The contract name used by the Python API, the CLI and the data files.
Sourcepub const fn is_structural(self) -> bool
pub const fn is_structural(self) -> bool
true for the structural tokens Mvs, Nirugu and Zwj.