Enum unicode_linebreak::BreakClass
source · #[repr(u8)]pub enum BreakClass {
Show 43 variants
Mandatory,
CarriageReturn,
LineFeed,
CombiningMark,
NextLine,
Surrogate,
WordJoiner,
ZeroWidthSpace,
NonBreakingGlue,
Space,
ZeroWidthJoiner,
BeforeAndAfter,
After,
Before,
Hyphen,
Contingent,
ClosePunctuation,
CloseParenthesis,
Exclamation,
Inseparable,
NonStarter,
OpenPunctuation,
Quotation,
InfixSeparator,
Numeric,
Postfix,
Prefix,
Symbol,
Ambiguous,
Alphabetic,
ConditionalJapaneseStarter,
EmojiBase,
EmojiModifier,
HangulLvSyllable,
HangulLvtSyllable,
HebrewLetter,
Ideographic,
HangulLJamo,
HangulVJamo,
HangulTJamo,
RegionalIndicator,
ComplexContext,
Unknown,
}
Expand description
Unicode line breaking class.
Variants§
Mandatory
Cause a line break (after)
CarriageReturn
Cause a line break (after), except between CR and LF
LineFeed
Cause a line break (after)
CombiningMark
Prohibit a line break between the character and the preceding character
NextLine
Cause a line break (after)
Surrogate
Do not occur in well-formed text
WordJoiner
Prohibit line breaks before and after
ZeroWidthSpace
Provide a break opportunity
NonBreakingGlue
Prohibit line breaks before and after
Space
Enable indirect line breaks
ZeroWidthJoiner
Prohibit line breaks within joiner sequences
BeforeAndAfter
Provide a line break opportunity before and after the character
After
Generally provide a line break opportunity after the character
Before
Generally provide a line break opportunity before the character
Hyphen
Provide a line break opportunity after the character, except in numeric context
Contingent
Provide a line break opportunity contingent on additional information
ClosePunctuation
Prohibit line breaks before
CloseParenthesis
Prohibit line breaks before
Exclamation
Prohibit line breaks before
Inseparable
Allow only indirect line breaks between pairs
NonStarter
Allow only indirect line breaks before
OpenPunctuation
Prohibit line breaks after
Quotation
Act like they are both opening and closing
InfixSeparator
Prevent breaks after any and before numeric
Numeric
Form numeric expressions for line breaking purposes
Postfix
Do not break following a numeric expression
Prefix
Do not break in front of a numeric expression
Symbol
Prevent a break before, and allow a break after
Ambiguous
Act like AL when the resolved EAW is N; otherwise, act as ID
Alphabetic
Are alphabetic characters or symbols that are used with alphabetic characters
ConditionalJapaneseStarter
Treat as NS or ID for strict or normal breaking.
EmojiBase
Do not break from following Emoji Modifier
EmojiModifier
Do not break from preceding Emoji Base
HangulLvSyllable
Form Korean syllable blocks
HangulLvtSyllable
Form Korean syllable blocks
HebrewLetter
Do not break around a following hyphen; otherwise act as Alphabetic
Ideographic
Break before or after, except in some numeric context
HangulLJamo
Form Korean syllable blocks
HangulVJamo
Form Korean syllable blocks
HangulTJamo
Form Korean syllable blocks
RegionalIndicator
Keep pairs together. For pairs, break before and after other classes
ComplexContext
Provide a line break opportunity contingent on additional, language-specific context analysis
Unknown
Have as yet unknown line breaking behavior or unassigned code positions
Trait Implementations§
source§impl Clone for BreakClass
impl Clone for BreakClass
source§fn clone(&self) -> BreakClass
fn clone(&self) -> BreakClass
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BreakClass
impl Debug for BreakClass
source§impl Hash for BreakClass
impl Hash for BreakClass
source§impl PartialEq<BreakClass> for BreakClass
impl PartialEq<BreakClass> for BreakClass
source§fn eq(&self, other: &BreakClass) -> bool
fn eq(&self, other: &BreakClass) -> bool
self
and other
values to be equal, and is used
by ==
.