#[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

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.