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

source§

fn clone(&self) -> BreakClass

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BreakClass

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Hash for BreakClass

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<BreakClass> for BreakClass

source§

fn eq(&self, other: &BreakClass) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for BreakClass

source§

impl Eq for BreakClass

source§

impl StructuralEq for BreakClass

source§

impl StructuralPartialEq for BreakClass

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.